pub trait Validator: Send + Sync {
// Required methods
fn patterns(&self) -> &[&str];
fn validate(&self, path: &Path, src: &str) -> Vec<Diagnostic>;
// Provided method
fn validate_batch(&self, _files: &[(PathBuf, String)]) -> Vec<Diagnostic> { ... }
}Required Methods§
Provided Methods§
Sourcefn validate_batch(&self, _files: &[(PathBuf, String)]) -> Vec<Diagnostic>
fn validate_batch(&self, _files: &[(PathBuf, String)]) -> Vec<Diagnostic>
Cross-file validation called once after all per-file passes. Receives only the files claimed by this validator. Default implementation returns no diagnostics; override for rules that require global state (e.g. duplicate-name detection).