-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Closed
Labels
bugUnexpected and reproducible misbehavior.Unexpected and reproducible misbehavior.
Description
New Issue Checklist
- Updated SwiftLint to the latest version
- I searched for existing GitHub issues
Describe the bug
Given
struct SSS {
func reduce(initial: Bool,
closure: (Bool, Bool) -> Bool) -> Bool {
false
}
}
_ = SSS().reduce(initial: false) { _, _ in true }
the reduce_boolean
rule is triggered, and it's suggested I use contains
.
Complete output when running SwiftLint, including the stack trace and command used
$ swiftlint lint
[Xcode 14.3's `foo is implemented in bar and baz` lines omitted]
Linting Swift files at paths File.swift
Linting 'File.swift' (1/1)
/Users/eric/File.swift:7:11: warning: Reduce Boolean Violation: Use `contains` instead (reduce_boolean)
Done linting! Found 1 violation, 0 serious in 1 file.
Environment
- SwiftLint version
0.50.3
- Installation method used
brew
- No configuration file
- Which Xcode version are you using:
Xcode 14.3 Build version 14E222b
- Do you have a sample that shows the issue?
see above
Metadata
Metadata
Assignees
Labels
bugUnexpected and reproducible misbehavior.Unexpected and reproducible misbehavior.