pub trait Rule: Send + Sync {
// Required methods
fn code(&self) -> &RuleCode;
fn name(&self) -> &str;
fn severity(&self) -> Severity;
fn category(&self) -> RuleCategory;
fn meta(&self) -> &RuleMeta;
fn check(&self, context: &LintContext<'_>) -> Vec<CheckFailure>;
// Provided methods
fn is_fixable(&self) -> bool { ... }
fn fix(&self, _source: &str) -> Option<String> { ... }
fn get_message(&self, _details: &HashMap<String, String>) -> String { ... }
}Expand description
A rule that can check Docker Compose files.
Required Methods§
Sourcefn category(&self) -> RuleCategory
fn category(&self) -> RuleCategory
Get the rule category.
Sourcefn check(&self, context: &LintContext<'_>) -> Vec<CheckFailure>
fn check(&self, context: &LintContext<'_>) -> Vec<CheckFailure>
Check the compose file and return any failures.
Provided Methods§
Sourcefn is_fixable(&self) -> bool
fn is_fixable(&self) -> bool
Whether this rule can auto-fix issues.