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>,
pub detail: Option<String>,
pub fixes: Vec<TextEdit>,
}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.
detail: Option<String>Varying finding-specific detail (link target, offending phrase, duplicate line ref, YAML error text). Reporters show this once per row instead of repeating a boilerplate prefix on every message.
fixes: Vec<TextEdit>Deterministic edits that, if applied, resolve this finding. Empty when no automated fix is available.
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