Support running individual lint checks

Add support for passing `--lint=LINT_TO_RUN` to the lint runner and
add corresponding help message.
This commit is contained in:
David Gumberg
2024-04-24 22:36:24 -04:00
parent 457e1846d2
commit 0fcbfdb7ad
2 changed files with 138 additions and 15 deletions

View File

@@ -26,6 +26,21 @@ Then you can use:
( cd ./test/lint/test_runner/ && cargo fmt && cargo clippy && RUST_BACKTRACE=1 cargo run )
```
If you wish to run individual lint checks, run the test_runner with
`--lint=TEST_TO_RUN` arguments. If running with `cargo run`, arguments after
`--` are passed to the binary you are running e.g.:
```sh
( cd ./test/lint/test_runner/ && RUST_BACKTRACE=1 cargo run -- --lint=doc --lint=trailing_whitespace )
```
To see a list of all individual lint checks available in test_runner, use `-h`
or `--help`:
```sh
( cd ./test/lint/test_runner/ && RUST_BACKTRACE=1 cargo run -- --help )
```
#### Dependencies
| Lint test | Dependency |