cmake_format
cmake_format copied to clipboard
Linter: filter lint checks
Hi, thanks for the awesome tool, I'm a big fan.
I thought it would be a very nice feature to selectively enable and/or disable certain lint codes. Maybe that's already possible in same way, but I couldn't figure out how (please enlighten me if so).
Use case:
I'm currently trying to get a project to follow a certain style guide. But for now, I'm concentrating on a subset of the checks. So currently, running the linter is still quite noisy (e.g I'm getting a lot of bad indentation and trailing white space warnings, which I don't want to deal with right now). That can make it harder to spot the things I'm currently trying to clean up or prevent from getting back in.
I think, it would be super helpful for me, to be able to run something along the lines fd "cmake$|CMakeLists.txt" -x cmake-format --lint-codes="C0103"
, then I get all the places I use the wrong variable or function names.
Just an idea :^)
I think you are looking for the option called disabled_codes
(documentation here)
This issue here also helps: https://github.com/cheshirekow/cmake_format/issues/209