-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Closed
Labels
enhancementIdeas for improvements of existing features and rules.Ideas for improvements of existing features and rules.helpQuestions or user problems that require more explanation rather than code changes.Questions or user problems that require more explanation rather than code changes.integrationIssues related to integration of SwiftLint into toolchains.Issues related to integration of SwiftLint into toolchains.
Description
New Issue Checklist
- I've Updated SwiftLint to the latest version.
- I've searched for existing GitHub issues.
Bug Description
prefer_key_path in 0.58.0 warns if {$0} is used instead of ()\.self for a Swift file in a SwiftPM project whose Package.swift contains // swift-tools-version:5.7.1 & swiftLanguageVersions: [.v5].
I assume that SwiftVersion.current used in SwiftVersion.current >= .six doesn't properly determine the correct version of Swift that is being used.
Mention the command or other SwiftLint integration method that caused the issue. Include stack traces or command output.
$ swiftlint --strict --quiet SourcesEnvironment
- SwiftLint version (run
swiftlint versionto be sure) 0.58.0 - Xcode version (run
xcodebuild -versionto be sure) 16.0 (16A242d) - Installation method used (Homebrew, CocoaPods, building from source, etc) Homebrew
- Configuration file:
---
opt_in_rules:
- all
disabled_rules:
# eventually enable
- file_header
- one_declaration_per_file
- trailing_comma
# never enable
- contrasted_opening_brace
- explicit_acl
- explicit_enum_raw_value
- explicit_top_level_acl
- explicit_type_interface
- no_extension_access_modifier
- no_grouping_extension
- no_magic_numbers
- prefixed_toplevel_constant
- sorted_enum_cases
- vertical_whitespace_between_cases
file_name:
excluded: [Finder.swift, Utilities.swift]
file_types_order:
order:
[
[main_type],
[supporting_type],
[extension],
[preview_provider],
[library_content_provider],
]
number_separator:
minimum_length: 6
type_contents_order:
order:
[
[case],
[type_alias, associated_type],
[subtype],
[type_property],
[instance_property],
[ib_inspectable],
[ib_outlet],
[initializer],
[deinitializer],
[type_method],
[view_life_cycle_method],
[ib_action],
[other_method],
[subscript],
]Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementIdeas for improvements of existing features and rules.Ideas for improvements of existing features and rules.helpQuestions or user problems that require more explanation rather than code changes.Questions or user problems that require more explanation rather than code changes.integrationIssues related to integration of SwiftLint into toolchains.Issues related to integration of SwiftLint into toolchains.