pub trait Rule:
CloneRule
+ DynClone
+ Debug
+ 'static
+ Send
+ Sync {
Show 15 methods
// Required methods
fn load_from_config(
&self,
_config: &AHashMap<String, Value>,
) -> Result<ErasedRule, String>;
fn name(&self) -> &'static str;
fn description(&self) -> &'static str;
fn long_description(&self) -> &'static str;
fn groups(&self) -> &'static [RuleGroups];
fn eval(&self, rule_cx: RuleContext<'_>) -> Vec<LintResult>;
fn crawl_behaviour(&self) -> Crawler;
// Provided methods
fn lint_phase(&self) -> LintPhase { ... }
fn config_ref(&self) -> &'static str { ... }
fn force_enable(&self) -> bool { ... }
fn dialect_skip(&self) -> &'static [DialectKind] { ... }
fn code(&self) -> &'static str { ... }
fn is_fix_compatible(&self) -> bool { ... }
fn crawl(
&self,
tables: &Tables,
dialect: &Dialect,
fix: bool,
templated_file: &TemplatedFile,
tree: ErasedSegment,
config: &FluffConfig,
) -> (Vec<SQLLintError>, Vec<LintFix>) { ... }
fn process_lint_result(
&self,
res: LintResult,
templated_file: &TemplatedFile,
new_lerrs: &mut Vec<SQLLintError>,
new_fixes: &mut Vec<LintFix>,
) { ... }
}
Required Methods§
fn load_from_config( &self, _config: &AHashMap<String, Value>, ) -> Result<ErasedRule, String>
fn name(&self) -> &'static str
fn description(&self) -> &'static str
fn long_description(&self) -> &'static str
Sourcefn groups(&self) -> &'static [RuleGroups]
fn groups(&self) -> &'static [RuleGroups]
All the groups this rule belongs to, including ‘all’ because that is a given. There should be no duplicates and ‘all’ should be the first element.
fn eval(&self, rule_cx: RuleContext<'_>) -> Vec<LintResult>
fn crawl_behaviour(&self) -> Crawler
Provided Methods§
fn lint_phase(&self) -> LintPhase
fn config_ref(&self) -> &'static str
fn force_enable(&self) -> bool
Sourcefn dialect_skip(&self) -> &'static [DialectKind]
fn dialect_skip(&self) -> &'static [DialectKind]
Returns the set of dialects for which a particular rule should be skipped.