feat(xatu): report deprecated toPath calls
This commit is contained in:
@@ -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()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user