Trait sqruff_lib::core::rules::base::Rule

source ·
pub trait Rule: Debug + 'static {
    // Required methods
    fn eval(&self, rule_cx: RuleContext) -> Vec<LintResult>;
    fn crawl_behaviour(&self) -> Crawler;

    // Provided methods
    fn lint_phase(&self) -> &'static str { ... }
    fn description(&self) -> &'static str { ... }
    fn is_fix_compatible(&self) -> bool { ... }
    fn crawl(
        &self,
        dialect: Dialect,
        fix: bool,
        tree: Box<dyn Segment>
    ) -> (Vec<SQLLintError>, Vec<LintFix>) { ... }
    fn process_lint_result(
        &self,
        res: LintResult,
        new_lerrs: &mut Vec<SQLLintError>,
        new_fixes: &mut Vec<LintFix>
    ) { ... }
}

Required Methods§

Provided Methods§

source

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

source

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

source

fn is_fix_compatible(&self) -> bool

source

fn crawl( &self, dialect: Dialect, fix: bool, tree: Box<dyn Segment> ) -> (Vec<SQLLintError>, Vec<LintFix>)

source

fn process_lint_result( &self, res: LintResult, new_lerrs: &mut Vec<SQLLintError>, new_fixes: &mut Vec<LintFix> )

Implementors§