Mark sometimes-fixable rules as Availability::Sometimes (#2552)

This commit is contained in:
Charlie Marsh 2023-02-03 14:42:10 -05:00 committed by GitHub
parent da0374f360
commit 64c79bde83
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 9 additions and 9 deletions

View file

@ -51,7 +51,7 @@ define_violation!(
}
);
impl Violation for UnusedLoopControlVariable {
const AUTOFIX: Option<AutofixKind> = Some(AutofixKind::new(Availability::Always));
const AUTOFIX: Option<AutofixKind> = Some(AutofixKind::new(Availability::Sometimes));
#[derive_message_formats]
fn message(&self) -> String {

View file

@ -19,7 +19,7 @@ define_violation!(
}
);
impl Violation for YodaConditions {
const AUTOFIX: Option<AutofixKind> = Some(AutofixKind::new(Availability::Always));
const AUTOFIX: Option<AutofixKind> = Some(AutofixKind::new(Availability::Sometimes));
#[derive_message_formats]
fn message(&self) -> String {

View file

@ -18,7 +18,7 @@ fn fmt_blank_line_after_summary_autofix_msg(_: &BlankLineAfterSummary) -> String
"Insert single blank line".to_string()
}
impl Violation for BlankLineAfterSummary {
const AUTOFIX: Option<AutofixKind> = Some(AutofixKind::new(Availability::Always));
const AUTOFIX: Option<AutofixKind> = Some(AutofixKind::new(Availability::Sometimes));
#[derive_message_formats]
fn message(&self) -> String {

View file

@ -24,7 +24,7 @@ fn fmt_unused_import_autofix_msg(unused_import: &UnusedImport) -> String {
}
}
impl Violation for UnusedImport {
const AUTOFIX: Option<AutofixKind> = Some(AutofixKind::new(Availability::Always));
const AUTOFIX: Option<AutofixKind> = Some(AutofixKind::new(Availability::Sometimes));
#[derive_message_formats]
fn message(&self) -> String {

View file

@ -21,7 +21,7 @@ define_violation!(
}
);
impl Violation for MultiValueRepeatedKeyLiteral {
const AUTOFIX: Option<AutofixKind> = Some(AutofixKind::new(Availability::Always));
const AUTOFIX: Option<AutofixKind> = Some(AutofixKind::new(Availability::Sometimes));
#[derive_message_formats]
fn message(&self) -> String {
@ -47,7 +47,7 @@ define_violation!(
}
);
impl Violation for MultiValueRepeatedKeyVariable {
const AUTOFIX: Option<AutofixKind> = Some(AutofixKind::new(Availability::Always));
const AUTOFIX: Option<AutofixKind> = Some(AutofixKind::new(Availability::Sometimes));
#[derive_message_formats]
fn message(&self) -> String {

View file

@ -18,7 +18,7 @@ define_violation!(
}
);
impl Violation for ConsiderUsingFromImport {
const AUTOFIX: Option<AutofixKind> = Some(AutofixKind::new(Availability::Always));
const AUTOFIX: Option<AutofixKind> = Some(AutofixKind::new(Availability::Sometimes));
#[derive_message_formats]
fn message(&self) -> String {

View file

@ -15,7 +15,7 @@ define_violation!(
}
);
impl Violation for DatetimeTimezoneUTC {
const AUTOFIX: Option<AutofixKind> = Some(AutofixKind::new(Availability::Always));
const AUTOFIX: Option<AutofixKind> = Some(AutofixKind::new(Availability::Sometimes));
#[derive_message_formats]
fn message(&self) -> String {

View file

@ -21,7 +21,7 @@ define_violation!(
}
);
impl Violation for ImportReplacements {
const AUTOFIX: Option<AutofixKind> = Some(AutofixKind::new(Availability::Always));
const AUTOFIX: Option<AutofixKind> = Some(AutofixKind::new(Availability::Sometimes));
#[derive_message_formats]
fn message(&self) -> String {