Skip to main content

Plugin

Trait Plugin 

Source
pub trait Plugin: Send + Sync {
    // Required methods
    fn name(&self) -> &str;
    fn analyze(&self, ctx: &AnalysisContext<'_>) -> Vec<Finding>;

    // Provided methods
    fn version(&self) -> &str { ... }
    fn description(&self) -> &str { ... }
    fn authors(&self) -> Vec<String> { ... }
}
Expand description

Core trait that all analyzers implement.

Required Methods§

Source

fn name(&self) -> &str

Unique identifier for this plugin.

Source

fn analyze(&self, ctx: &AnalysisContext<'_>) -> Vec<Finding>

Run analysis on a single file and return findings.

Provided Methods§

Source

fn version(&self) -> &str

Plugin version (e.g. “1.0.0”).

Source

fn description(&self) -> &str

Short description of what the plugin detects.

Source

fn authors(&self) -> Vec<String>

List of authors.

Implementors§