pub struct Violation {
pub rule_id: RuleId,
pub location: Location,
pub message: String,
pub remediation: String,
pub severity: Severity,
pub fix: Option<Fix>,
}Expand description
One reported problem.
Fields§
§rule_id: RuleIdWhich rule reported it.
location: LocationWhere it is.
message: StringOne line saying what is wrong. Usually the rule card’s message, but a rule may substitute a more specific one for a particular match.
remediation: StringWhat to do about it. Usually the rule card’s remediation.
severity: SeveritySeverity as resolved by config, not as the rule declared it.
fix: Option<Fix>A replacement the rule offered, if it offered one.
Not part of the canonical sort: two violations differing only in their fix are the same finding, and letting a fix change their order would make output depend on something a reader cannot see.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Violation
impl<'de> Deserialize<'de> for Violation
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for Violation
impl StructuralPartialEq for Violation
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