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
I'm seeing the empty_count rule triggering an error when doing a count comparison that isn't on a Collection, as shown in the screenshot below:
I think this can be solved by making the following change to Source/SwiftLintFramework/Rules/EmptyCountRule.swift line 34:
From: let pattern = "count\\s*(==|!=|<|<=|>|>=)\\s*0"
let pattern = "count\\s*(==|!=|<|<=|>|>=)\\s*0"
To: let pattern = ".count\\s*(==|!=|<|<=|>|>=)\\s*0"
let pattern = ".count\\s*(==|!=|<|<=|>|>=)\\s*0"
This will ensure that we're checking for uses of the count member var, instead of checking every identifier named "count".
count
Running Swiftlint 0.15.0
The text was updated successfully, but these errors were encountered:
Duplicate of #827
Sorry, something went wrong.
No branches or pull requests
I'm seeing the empty_count rule triggering an error when doing a count comparison that isn't on a Collection, as shown in the screenshot below:
I think this can be solved by making the following change to Source/SwiftLintFramework/Rules/EmptyCountRule.swift line 34:
From:
let pattern = "count\\s*(==|!=|<|<=|>|>=)\\s*0"
To:
let pattern = ".count\\s*(==|!=|<|<=|>|>=)\\s*0"
This will ensure that we're checking for uses of the
count
member var, instead of checking every identifier named "count".Running Swiftlint 0.15.0
The text was updated successfully, but these errors were encountered: