mirror of
https://github.com/astral-sh/ruff.git
synced 2025-07-24 13:33:50 +00:00
[ruff
] Add fix safety section (RUF028
) (#17722)
The PR add the fix safety section for rule `RUF028` (https://github.com/astral-sh/ruff/issues/15584 ) See also [here](https://github.com/astral-sh/ruff/issues/15584#issuecomment-2820424485) for the reason behind the _unsafe_ of the fix.
This commit is contained in:
parent
0eeb02c0c1
commit
c5e41c278c
1 changed files with 6 additions and 0 deletions
|
@ -49,6 +49,12 @@ use super::suppression_comment_visitor::{
|
|||
/// # fmt: on
|
||||
/// # yapf: enable
|
||||
/// ```
|
||||
///
|
||||
/// ## Fix safety
|
||||
///
|
||||
/// This fix is always marked as unsafe because it deletes the invalid suppression comment,
|
||||
/// rather than trying to move it to a valid position, which the user more likely intended.
|
||||
///
|
||||
#[derive(ViolationMetadata)]
|
||||
pub(crate) struct InvalidFormatterSuppressionComment {
|
||||
reason: IgnoredReason,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue