Trait rslint_core::Rule [−][src]
pub trait Rule: Debug + DynClone + Send + Sync {
fn name(&self) -> &'static str;
fn group(&self) -> &'static str;
fn docs(&self) -> &'static str { ... }
fn tags(&self) -> &'static [Tag] { ... }
fn recommended(&self) -> bool { ... }
}
Expand description
A generic trait which describes things common to a rule regardless on what they run on.
Each rule should have a new
function for easy instantiation. We however do not require this
for the purposes of allowing more complex rules to instantiate themselves in a different way.
However the rules must be easily instantiated because of rule groups.
Required methods
Provided methods
A list of tags present on this rule. Empty by default.
fn recommended(&self) -> bool
fn recommended(&self) -> bool
Whether this rule is recommended, this is a simple helper around Self::tags
.