pub trait Rule: Send + Sync {
// Required methods
fn id(&self) -> &str;
fn severity(&self) -> Severity;
fn file_glob(&self) -> Option<&str>;
fn check_file(&self, ctx: &ScanContext<'_>) -> Vec<Violation>;
}Expand description
A lint rule that checks source files for violations.
Required Methods§
Sourcefn check_file(&self, ctx: &ScanContext<'_>) -> Vec<Violation>
fn check_file(&self, ctx: &ScanContext<'_>) -> Vec<Violation>
Scan a single file and return any violations found.