Skip to content
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

enabled_rules option in .swiftlint.yml? #256

Closed
daniel-beard opened this issue Dec 9, 2015 · 4 comments
Closed

enabled_rules option in .swiftlint.yml? #256

daniel-beard opened this issue Dec 9, 2015 · 4 comments
Labels
enhancement Ideas for improvements of existing features and rules.

Comments

@daniel-beard
Copy link
Contributor

  • It would be helpful to have an enabled_rules option in the .swiftlint.yml config file that works as a whitelist.
  • I'm using swiftlint as part of a CI process, so by using the disabled_rules option, each time I upgrade the swift lint binary, and there have been new rules added, I have to disable more rules (otherwise swiftlint will generate warnings / errors for rules I don't necessarily want).
@jpsim
Copy link
Collaborator

jpsim commented Dec 9, 2015

Thanks for the suggestion!

I think we should add both an enabled_rules and a rules

  • enabled_rules would opt into rules that are disabled by default
  • rules would be a final list of all rules to be used, and specifying a value for this would ignore enabled_rules and disabled_rules

@jpsim jpsim added the enhancement Ideas for improvements of existing features and rules. label Dec 9, 2015
@scottrhoyt
Copy link
Contributor

@jpsim I think it starts to get complicated if we allow blacks lists, black lists with opt in, and white lists. Why not just got with the "either black list or white list" approach, similar to included and excluded?

@jpsim
Copy link
Collaborator

jpsim commented Dec 29, 2015

You're right @scottrhoyt. Re-reading my comment I don't recall why I though that would be a good idea.

@jpsim
Copy link
Collaborator

jpsim commented Jan 29, 2016

done in #436.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Ideas for improvements of existing features and rules.
Projects
None yet
Development

No branches or pull requests

3 participants