-
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
- I've Updated SwiftLint to the latest version.
- I've searched for existing GitHub issues.
Bug Description
The following code causes false positive prefer_type_checking
violation:
let value: String? = nil
print(value as Any? != nil) // -> false
Let's try fix it:
swiftlint . --fix
Now we got this:
let value: String? = nil
// xcodebuild warning: `'is' test is always true`
print(value is Any?) // -> now true, that's not expected
Environment
- SwiftLint version: 0.57.0
- Xcode version: 16.0 (16A242d)
- Installation method used: Homebrew
- Configuration file: None
Metadata
Metadata
Assignees
Labels
bugUnexpected and reproducible misbehavior.Unexpected and reproducible misbehavior.