Skip to main content

SemanticCheck

Trait SemanticCheck 

Source
pub trait SemanticCheck: Send + Sync {
    // Required methods
    fn name(&self) -> &str;
    fn run(&self, ctx: &CheckContext) -> Vec<Finding>;
}
Expand description

Trait that every semantic check must implement.

Checks are stateless: all mutable context is supplied via CheckContext.

Required Methods§

Source

fn name(&self) -> &str

A unique, kebab-case name for the check (e.g. “no-unsafe-added”).

Source

fn run(&self, ctx: &CheckContext) -> Vec<Finding>

Execute the check against the provided context and return any findings.

Implementors§