-
Notifications
You must be signed in to change notification settings - Fork 2.2k
New issue
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
Feature Request: Mechanism to enable all opt-in rules by default #4540
Comments
See #4544 |
Have you tried the By the way, we’ve historically been pretty liberal with allowing opt-in rules so I wouldn’t recommend actually keeping all rules enabled. |
So The intent here is to enable all opt-in rules by default, but to allow the user to disable any that they don't want. Our internal policy (at my place of work) is to pretty much enable all rules (and all new rules), except any that we find annoying/disagree with the premise of/currently produce too many hits in our codebase (we operate a zero warnings policy). When we upgrade SwiftLint, we use This is annoying because we can't tell from With We can then just run SwiftLint, and decide, based on any hits, whether to keep the new rules (and patch any violations), or to explicitly disable them. |
Yeah, mostly it's in place for testing SwiftLint itself rather than a frequently used end-user feature. We use it to run on PRs to detect what changes there are to the lint results of linting dozens of open source projects. It's also useful when someone reports an issue, they can lint a file with the flag and get the violations from all rules, regardless of what's defined in their
Wanting to audit new rules is a common workflow and one for which we've never had a good story other than manually scanning the release notes. Having an Another one could be to track version info with rules, like add a This would help users who don't want to explicitly all the rules they don't want in the Like for Lyft's case, we use What do you think? |
So I like the I can see the value of Could we have both? |
Resolved by #4544 |
New Issue Checklist
Describe the bug
I wasn't sure whether to file this as a new rule request or not. I guess an
all
"pseudo-rule" would do what I want.I'd like to be able to enable all opt-in rules in my configuration file;
would be fine (then I can disable the ones I don't want via
disabled_rules
).This would save me having to check for new opt-in rules when I upgrade to a new version of SwiftLint
Complete output when running SwiftLint, including the stack trace and command used
N/A
Environment
N/A
The text was updated successfully, but these errors were encountered: