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§
Sourcefn description(&self) -> &'static str
fn description(&self) -> &'static str
Rule description.
Sourcefn default_severity(&self) -> IssueSeverity
fn default_severity(&self) -> IssueSeverity
Default severity level.
Sourcefn category(&self) -> IssueCategory
fn category(&self) -> IssueCategory
Issue category this rule checks for.
Sourcefn check_script(&self, analysis: &ScriptAnalysis<'_>) -> Vec<LintIssue>
fn check_script(&self, analysis: &ScriptAnalysis<'_>) -> Vec<LintIssue>
Check script and return issues.