ruff/scripts
Martin Fischer 4e4643aa5d refactor: Decouple Rule from linter prefixes
543865c96b introduced
RuleCode::origin() -> RuleOrigin generation via a macro, while that
signature now has been renamed to Rule::origin() -> Linter we actually
want to get rid of it since rules and linters shouldn't be this tightly
coupled (since one rule can exist in multiple linters).

Another disadvantage of the previous approach was that the prefixes
had to be defined in ruff_macros/src/prefixes.rs, which was easy to
miss when defining new linters in src/*, case in point
INP001 => violations::ImplicitNamespacePackage has in the meantime been
added without ruff_macros/src/prefixes.rs being updated accordingly
which resulted in `ruff --explain INP001` mistakenly reporting that the
rule belongs to isort (since INP001 starts with the isort prefix "I").
The derive proc macro introduced in this commit requires every variant
to have at least one #[prefix = "..."], eliminating such mistakes.
2023-01-20 20:25:57 -05:00
..
benchmarks Add benchmark scripts for no-IO (#1925) 2023-01-16 17:38:40 -05:00
_utils.py refactor: Rename RuleOrigin to Linter 2023-01-20 20:25:57 -05:00
add_plugin.py refactor: Decouple Rule from linter prefixes 2023-01-20 20:25:57 -05:00
add_rule.py refactor: Rename RuleOrigin to Linter 2023-01-20 20:25:57 -05:00
pyproject.toml fix: Update add_rule.py to account for 81996f1bc 2023-01-20 08:09:54 -05:00