Rule

Trait Rule 

Source
pub trait Rule: Send + Sync {
    // Required methods
    fn code(&self) -> &'static str;
    fn severity(&self) -> Severity;
    fn name(&self) -> &'static str;
    fn description(&self) -> &'static str;
    fn check(&self, ctx: &LintContext<'_>) -> Vec<CheckFailure>;

    // Provided method
    fn is_fixable(&self) -> bool { ... }
}
Expand description

A lint rule that can check Helm charts.

Required Methods§

Source

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

Get the rule code (e.g., “HL1001”).

Source

fn severity(&self) -> Severity

Get the default severity.

Source

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

Get the rule name.

Source

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

Get the rule description.

Source

fn check(&self, ctx: &LintContext<'_>) -> Vec<CheckFailure>

Run the rule and return any violations.

Provided Methods§

Source

fn is_fixable(&self) -> bool

Check if this rule can be auto-fixed.

Implementors§