Skip to content

SwiftLint plugin's suggested config starts Linux binary on x86_64 Mac OS machine #5954

@zbynek

Description

@zbynek

New Issue Checklist

Bug Description

When using the config from

SWIFTLINT_CMD=$(ls "$SWIFT_PACKAGE_DIR"/swiftlintplugins/SwiftLintBinary/SwiftLintBinary.artifactbundle/swiftlint-*/bin/swiftlint | head -n 1)
,
running SwiftLint results in execution of .../SwiftLintBinary.artifactbundle/swiftlint-0.58.0-linux-gnu/bin/swiftlint which fails to run on Mac OS because the * in SWIFTLINT_CMD matches both Linux and MacOS binaries.

Environment

  • SwiftLint version: 0.58
  • Xcode version: Xcode 16.0, Build version 16A242d
  • Installation method: Tuist
let packages: [Package] = [
    .package(url: "https://github.com/SimplyDanny/SwiftLintPlugins", from: "0.56.1")
]
Config file (irrelevant in this case)
disabled_rules: # rule identifiers turned on by default to exclude from running
- line_length
- file_length
- type_body_length
- function_body_length
- identifier_name
- type_name
- large_tuple
- nesting
- function_parameter_count
- cyclomatic_complexity
- redundant_discardable_let
- force_cast # re-enable at some point
- comment_spacing
- notification_center_detachment
- for_where
- trailing_whitespace
- xctfail_message
- unused_optional_binding
- private_over_fileprivate
- no_fallthrough_only
- inclusive_language

opt_in_rules: # some rules are turned off by default, so you need to opt-in
- empty_count: warning
- unused_import
- sorted_imports

#included: # paths to include during linting. `--path` is ignored if present.
#  - Source

excluded: # paths to ignore during linting. Takes precedence over `included`.
- Pods
- Tuist
- .gems

# configurable rules can be customized from this configuration file
# binary rules can set their severity level
#force_cast: warning # implicitly
force_try:
  severity: warning # explicitly

shorthand_operator:
  severity: warning

# trailing_whitespace: 
#   ignores_empty_lines: true
  
#line_length: 110

Related to #5866

Suggestions

Updating the README and maybe mentioning the necessary config change in GitHub Releases would be appreciated.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugUnexpected and reproducible misbehavior.documentationIssues related to documentation, either from the tooling side or content-wise.

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions