Trait Rule

Source
pub trait Rule {
    // Required methods
    fn name(&self) -> &'static str;
    fn description(&self) -> &'static str;
    fn check(
        &self,
        ast: &OrbitAst,
        file_path: &str,
    ) -> Result<Vec<Issue>, String>;
}
Expand description

Trait for lint rules

Required Methods§

Source

fn name(&self) -> &'static str

Name of the rule

Source

fn description(&self) -> &'static str

Description of the rule

Source

fn check(&self, ast: &OrbitAst, file_path: &str) -> Result<Vec<Issue>, String>

Check an .orbit file for issues

Implementors§