pub struct Violation {
pub rule_id: RuleId,
pub severity: Severity,
pub message: String,
pub file: PathBuf,
pub line: Option<usize>,
pub column: Option<usize>,
pub fix_hint: Option<String>,
pub snippet: Option<String>,
pub source_url: Option<String>,
}Expand description
A concrete finding produced by a rule.
Fields§
§rule_id: RuleIdRule that produced this finding.
severity: SeverityEffective severity (config overrides applied).
message: StringHuman-readable description of the finding.
file: PathBufFile the finding was raised against.
line: Option<usize>1-based line number, if known.
column: Option<usize>1-based column, if known.
fix_hint: Option<String>Suggested remediation, if the rule offers one.
snippet: Option<String>Offending source excerpt, if captured.
source_url: Option<String>Link to the rule’s documentation page.
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Violation
impl RefUnwindSafe for Violation
impl Send for Violation
impl Sync for Violation
impl Unpin for Violation
impl UnsafeUnpin for Violation
impl UnwindSafe for Violation
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more