feat(xatu): report deprecated toPath calls

This commit is contained in:
2026-09-18 23:57:08 -04:00
parent a6fe84190e
commit f8966fe2a8
9 changed files with 173 additions and 8 deletions

View File

@@ -1,7 +1,9 @@
use crate::FileId;
use crate::ast;
use crate::rules::deprecated_to_path::DeprecatedToPath;
use crate::rules::empty_inherit::EmptyInherit;
pub mod deprecated_to_path;
pub mod empty_inherit;
#[derive(Debug)]
@@ -54,13 +56,16 @@ pub fn run_rules(file: &ast::ParsedFile) -> Vec<Diagnostic> {
file.nodes
.iter()
.flat_map(|node| {
[run_node_rule::<EmptyInherit>(node)]
.into_iter()
.flatten()
.map(|finding| Diagnostic {
file_id: file.file_id,
finding,
})
[
run_node_rule::<EmptyInherit>(node),
run_node_rule::<DeprecatedToPath>(node),
]
.into_iter()
.flatten()
.map(|finding| Diagnostic {
file_id: file.file_id,
finding,
})
})
.collect()
}