mirror of
https://github.com/astral-sh/ruff.git
synced 2025-08-04 10:48:32 +00:00
Rename FixKind
to FixAvailability
(#7658)
**Summary** `FixKind` feels to generic, i suggest renaming it to something like `FixAvailibility`. Commands used: ```bash rg FixKind --files-with-matches | xargs sed -i 's/FixKind/FixAvailability/g' rg fix_kind --files-with-matches | xargs sed -i 's/fix_kind/fix_availability/g' rg FIX_KIND --files-with-matches | xargs sed -i 's/FIX_KIND/FIX_AVAILABILITY/g' cargo fmt ``` `rg -i "fix.kind"` doesn't show any matches anymore.
This commit is contained in:
parent
ebdfcee87f
commit
0961f008b8
76 changed files with 185 additions and 179 deletions
|
@ -405,7 +405,7 @@ fn register_rules<'a>(input: impl Iterator<Item = &'a Rule>) -> TokenStream {
|
|||
rule_message_formats_match_arms
|
||||
.extend(quote! {#(#attrs)* Self::#name => <#path as ruff_diagnostics::Violation>::message_formats(),});
|
||||
rule_fixable_match_arms.extend(
|
||||
quote! {#(#attrs)* Self::#name => <#path as ruff_diagnostics::Violation>::FIX_KIND,},
|
||||
quote! {#(#attrs)* Self::#name => <#path as ruff_diagnostics::Violation>::FIX_AVAILABILITY,},
|
||||
);
|
||||
rule_explanation_match_arms
|
||||
.extend(quote! {#(#attrs)* Self::#name => #path::explanation(),});
|
||||
|
@ -448,7 +448,7 @@ fn register_rules<'a>(input: impl Iterator<Item = &'a Rule>) -> TokenStream {
|
|||
}
|
||||
|
||||
/// Returns the fix status of this rule.
|
||||
pub const fn fixable(&self) -> ruff_diagnostics::FixKind {
|
||||
pub const fn fixable(&self) -> ruff_diagnostics::FixAvailability {
|
||||
match self { #rule_fixable_match_arms }
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue