Synthetica9 / nix-linter

Linter for the Nix expression language
BSD 3-Clause "New" or "Revised" License
158 stars 16 forks source link

Add ability to disable checks at command line #50

Closed lunik1 closed 3 years ago

lunik1 commented 3 years ago

As far as I can work out that while optional checks can be enabled by -W at the command line, there is no way of disabling checks that are enabled by default. It would be useful to be able to disable such checks n cases where you have too many false positives, or are just otherwise uninterested in that specific case.

When using -W I expected only the checks I specified to be enabled, however I appreciate changing this behaviour now would be a breaking change and inconvenient in many use cases. Perhaps there could be another flag that disables checks and takes precedence over -W?

Synthetica9 commented 3 years ago

It's been a while since I've worked on this, but if I recall correctly you can prefix no- to any check to disable it

lunik1 commented 3 years ago

Yes, that works. Thanks! Is this documented anywhere?