mirror of
https://github.com/astral-sh/ruff.git
synced 2025-08-03 10:22:24 +00:00
Hide unsafe fix suggestions when explicitly disabled (#9095)
Hides hints about unsafe fixes when they are disabled e.g. with `--no-unsafe-fixes` or `unsafe-fixes = false`. By default, unsafe fix hints are still displayed. This seems like a nice way to remove the nag for users who have chosen not to apply unsafe fixes. Inspired by comment at https://github.com/astral-sh/ruff/issues/9063#issuecomment-1850289675
This commit is contained in:
parent
2993c342d2
commit
8e9bf84047
6 changed files with 62 additions and 14 deletions
|
@ -93,8 +93,10 @@ pub struct Options {
|
|||
pub fix: Option<bool>,
|
||||
|
||||
/// Enable application of unsafe fixes.
|
||||
/// If excluded, a hint will be displayed when unsafe fixes are available.
|
||||
/// If set to false, the hint will be hidden.
|
||||
#[option(
|
||||
default = "false",
|
||||
default = r#"null"#,
|
||||
value_type = "bool",
|
||||
example = "unsafe-fixes = true"
|
||||
)]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue