oppiliappan / statix

lints and suggestions for the nix programming language
https://git.peppe.rs/languages/statix/about
MIT License
557 stars 21 forks source link

Feature request: allow disabling certain checks #19

Closed SuperSandro2000 closed 2 years ago

SuperSandro2000 commented 2 years ago

I want to start applying the tool to nixpkgs. For that I would like to disable certain checks or only enable one to keep the changes small and for example only remove extra ().

oppiliappan commented 2 years ago

Understood. For now, I'll add a config file to enable/disable lints. In the future, I think I'll add a way to selectively ignore issues with a comment such as:

#statix ignore
("hello")
SuperSandro2000 commented 2 years ago

I think we want to add which issue should be ignored to the comment like shellcheck does.

oppiliappan commented 2 years ago

Oh yeah, I intend to support two syntaxes:

# skip all issues on next line
#statix ignore

# skip specific issues on next line
#statix ignore: useless_parens, empty_let_in
oppiliappan commented 2 years ago

With the latest release (v0.4.1), you can disable checks with a configuration file. Please see https://github.com/nerdypepper/statix#configuration. Feel free to reopen or create a new issue if there are bugs with the new flag!