pub trait StackComplianceRule:
Send
+ Sync
+ Debug {
// Required methods
fn id(&self) -> &str;
fn description(&self) -> &str;
fn check(&self, project_path: &Path) -> Result<RuleResult>;
// Provided methods
fn help(&self) -> Option<&str> { ... }
fn can_fix(&self) -> bool { ... }
fn fix(&self, project_path: &Path) -> Result<FixResult> { ... }
fn category(&self) -> RuleCategory { ... }
}Expand description
Trait for stack compliance rules
Implement this trait to create custom compliance rules.
Required Methods§
Sourcefn description(&self) -> &str
fn description(&self) -> &str
Human-readable description
Sourcefn check(&self, project_path: &Path) -> Result<RuleResult>
fn check(&self, project_path: &Path) -> Result<RuleResult>
Check a project for compliance
Provided Methods§
Sourcefn fix(&self, project_path: &Path) -> Result<FixResult>
fn fix(&self, project_path: &Path) -> Result<FixResult>
Attempt to fix violations (if supported)
Sourcefn category(&self) -> RuleCategory
fn category(&self) -> RuleCategory
Category of this rule