We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The following code causes a empty_count false positive:
empty_count
if result.count <= 0xff { ... }
$ swiftlint lint abc.swift:115:30: error: Empty Count Violation: Prefer checking `isEmpty` over comparing `count` to zero. (empty_count)
SwiftLint version: 0.27.0
Installation method used: Homebrew
Which Xcode version: Xcode 10
Sample: echo "if result.count <= 0xff {}" | swiftlint lint --no-cache --use-stdin --enable-all-rules
echo "if result.count <= 0xff {}" | swiftlint lint --no-cache --use-stdin --enable-all-rules
// This triggers a violation: if result.count <= 0xff { ... }
The text was updated successfully, but these errors were encountered:
realm#2423 - Fix EmptyCountRule for binary, octal and hexadecimal int…
e9d2552
…eger literals
realm#2423 - Update changelog
e51646a
realm#2423 - Update documentation
21cd4e0
34f513a
4df518f
f11d7ec
7ce7a0f
No branches or pull requests
New Issue Checklist
Describe the bug
The following code causes a
empty_count
false positive:Complete output when running SwiftLint, including the stack trace and command used
Environment
SwiftLint version: 0.27.0
Installation method used: Homebrew
Which Xcode version: Xcode 10
Sample:
echo "if result.count <= 0xff {}" | swiftlint lint --no-cache --use-stdin --enable-all-rules
The text was updated successfully, but these errors were encountered: