pub trait Rule: CloneRule + DynClone + Debug + 'static + Send + Sync {
// Required methods
fn load_from_config(&self, _config: &AHashMap<String, Value>) -> ErasedRule;
fn name(&self) -> &'static str;
fn description(&self) -> &'static str;
fn eval(&self, rule_cx: RuleContext<'_>) -> Vec<LintResult>;
fn crawl_behaviour(&self) -> Crawler;
// Provided methods
fn lint_phase(&self) -> &'static str { ... }
fn config_ref(&self) -> &'static str { ... }
fn groups(&self) -> &'static [&'static str] { ... }
fn code(&self) -> &'static str { ... }
fn is_fix_compatible(&self) -> bool { ... }
fn crawl(
&self,
dialect: &Dialect,
fix: bool,
tree: ErasedSegment,
config: &FluffConfig
) -> (Vec<SQLLintError>, Vec<LintFix>) { ... }
fn process_lint_result(
&self,
res: LintResult,
new_lerrs: &mut Vec<SQLLintError>,
new_fixes: &mut Vec<LintFix>
) { ... }
}