LintRule

Trait LintRule 

Source
pub trait LintRule: Send + Sync {
    // Required methods
    fn id(&self) -> &'static str;
    fn name(&self) -> &'static str;
    fn description(&self) -> &'static str;
    fn default_severity(&self) -> IssueSeverity;
    fn category(&self) -> IssueCategory;
    fn check_script(&self, analysis: &ScriptAnalysis<'_>) -> Vec<LintIssue>;
}
Available on crate feature analysis only.
Expand description

Trait for implementing custom lint rules.

Required Methods§

Source

fn id(&self) -> &'static str

Unique identifier for this rule.

Source

fn name(&self) -> &'static str

Human-readable name.

Source

fn description(&self) -> &'static str

Rule description.

Source

fn default_severity(&self) -> IssueSeverity

Default severity level.

Source

fn category(&self) -> IssueCategory

Issue category this rule checks for.

Source

fn check_script(&self, analysis: &ScriptAnalysis<'_>) -> Vec<LintIssue>

Check script and return issues.

Implementors§