From b0bb75dc1cc0a01cf6d235be9c795ca9444273a3 Mon Sep 17 00:00:00 2001 From: Martin Fischer Date: Fri, 30 Dec 2022 07:51:47 +0100 Subject: [PATCH] Add --select to command suggested in CONTRIBUTING.md By default only E* and F* lints are enabled. I previously followed the CONTRIBUTING.md instructions to implement a TID* lint and was confused why my lint wasn't being run. --- CONTRIBUTING.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index a2c7a06f65..9e6294320a 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -66,7 +66,7 @@ understand how other, similar rules are implemented. To add a test fixture, create a file under `resources/test/fixtures`, named to match the `CheckCode` you defined earlier (e.g., `E402.py`). This file should contain a variety of violations and non-violations designed to evaluate and demonstrate the behavior of your lint rule. Run Ruff locally -with (e.g.) `cargo run resources/test/fixtures/E402.py --no-cache`. Once you're satisfied with the +with (e.g.) `cargo run resources/test/fixtures/E402.py --no-cache --select E402`. Once you're satisfied with the output, codify the behavior as a snapshot test by adding a new `testcase` macro to the `mod tests` section of `src/linter.rs`, like so: