Motivated by a comment in #29479, this draft PR refactors the lint runner into multiple modules, and refactors a few of the python linters to reuse common file excluding logic.
The include guards lint now prints all missing include guards before exiting, and all of the rewritten linters now exclude all subtrees, including crypto/caes
.
The lint runner now supports running individual linters by passing --lint=LINT_CHECK_TO_RUN
to the lint runner. If using cargo run
arguments can be passed e.g.:
0cd test/lint/test_runner && cargo run -- --lint=doc --lint=includes
I can see reasons why the benefits of this PR might be outweighed by the downsides so I’m just publishing this as a draft to explore if further rewriting/refactoring of the lint suite in rust is desirable, and if so, what the best approach is.