Skip to content

Commit 957c36c

Browse files
committed
rename noqa_code field
1 parent 210d83c commit 957c36c

File tree

1 file changed

+4
-4
lines changed
  • crates/ruff_linter/src/message

1 file changed

+4
-4
lines changed

crates/ruff_linter/src/message/mod.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ pub struct OldDiagnostic {
6161
pub fix: Option<Fix>,
6262
pub parent: Option<TextSize>,
6363
pub(crate) noqa_offset: Option<TextSize>,
64-
pub(crate) noqa_code: Option<String>,
64+
pub(crate) secondary_code: Option<String>,
6565
}
6666

6767
impl OldDiagnostic {
@@ -78,7 +78,7 @@ impl OldDiagnostic {
7878
fix: None,
7979
parent: None,
8080
noqa_offset: None,
81-
noqa_code: None,
81+
secondary_code: None,
8282
}
8383
}
8484

@@ -114,7 +114,7 @@ impl OldDiagnostic {
114114
fix,
115115
parent,
116116
noqa_offset,
117-
noqa_code: Some(rule.noqa_code().to_string()),
117+
secondary_code: Some(rule.noqa_code().to_string()),
118118
}
119119
}
120120

@@ -248,7 +248,7 @@ impl OldDiagnostic {
248248

249249
/// Returns the noqa code for the diagnostic message as a string.
250250
pub fn secondary_code(&self) -> Option<&str> {
251-
self.noqa_code.as_deref()
251+
self.secondary_code.as_deref()
252252
}
253253

254254
/// Returns the URL for the rule documentation, if it exists.

0 commit comments

Comments
 (0)