pub trait Rule: Send + Sync {
// Required methods
fn id(&self) -> RuleId;
fn name(&self) -> &'static str;
fn default_severity(&self) -> Severity;
fn check(&self, attrs: &IsmAttributes, ctx: &RuleContext) -> Vec<Diagnostic>;
}Expand description
The core trait every rule implementation must satisfy.
Rules are stateless. All configuration (severity overrides, corrections map) is resolved by the engine before rule invocation and passed via context.
Required Methods§
fn id(&self) -> RuleId
fn name(&self) -> &'static str
Sourcefn default_severity(&self) -> Severity
fn default_severity(&self) -> Severity
Default severity — overridable per rule in .marque.toml.