From 4c2c9bf7e083442fc5c687af5f846be6e7a5e412 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Schreiner?= Date: Mon, 16 Oct 2023 21:14:09 +0200 Subject: [PATCH] [docs] Clarify that new rules should be added to `RuleGroup::Preview`. (#7989) In the contributing page, clarify that new rules must be added to `RuleGroup::Preview` when mapping their code. --- CONTRIBUTING.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index f721c4992d403..35562266b948c 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -170,7 +170,8 @@ At a high level, the steps involved in adding a new lint rule are as follows: statements, like imports) or `analyze/expression.rs` (if your rule is based on analyzing expressions, like function calls). -1. Map the violation struct to a rule code in `crates/ruff_linter/src/codes.rs` (e.g., `B011`). +1. Map the violation struct to a rule code in `crates/ruff_linter/src/codes.rs` (e.g., `B011`). New rules + should be added in `RuleGroup::Preview`. 1. Add proper [testing](#rule-testing-fixtures-and-snapshots) for your rule.