pub trait FileAnalyzer {
// Required methods
fn analyze(
&self,
file_path: &Path,
content: &str,
) -> GuardianResult<Vec<Violation>>;
fn handles_file(&self, file_path: &Path) -> bool;
}Expand description
Trait for custom file analyzers
Required Methods§
Sourcefn analyze(
&self,
file_path: &Path,
content: &str,
) -> GuardianResult<Vec<Violation>>
fn analyze( &self, file_path: &Path, content: &str, ) -> GuardianResult<Vec<Violation>>
Analyze a file and return violations
Sourcefn handles_file(&self, file_path: &Path) -> bool
fn handles_file(&self, file_path: &Path) -> bool
Check if this analyzer handles the given file type