refactor: Rename RuleCodePrefix to RuleSelector

More accurate since the enum also encompasses:

* ALL (which isn't a prefix at all)

* fully-qualified rule codes (which aren't prefixes unless you say
  they're a prefix to the empty string but that's not intuitive)
This commit is contained in:
Martin Fischer 2023-01-20 14:50:05 +01:00 committed by Charlie Marsh
parent 7fc42f8f85
commit b19258a243
20 changed files with 256 additions and 276 deletions

View file

@ -78,7 +78,7 @@ mod tests {
fp.write(f"{indent}{pascal_case(plugin)},")
fp.write("\n")
elif line.strip() == "Linter::Ruff => Prefixes::Single(RuleCodePrefix::RUF),":
elif line.strip() == "Linter::Ruff => Prefixes::Single(RuleSelector::RUF),":
prefix = 'todo!("Fill-in prefix after generating codes")'
fp.write(
f"{indent}Linter::{pascal_case(plugin)} => Prefixes::Single({prefix}),"