Use fake rules for testing deprecation and removal infrastructure (#9752)

Updates #9689 and #9691 to use rule testing infrastructure from #9747
This commit is contained in:
Zanie Blue 2024-02-01 10:28:50 -06:00
parent e5008ca714
commit 46c0937bfa
5 changed files with 235 additions and 83 deletions

View file

@ -236,6 +236,16 @@ pub fn check_path(
}
Rule::NurseryTestRule => test_rules::NurseryTestRule::diagnostic(locator, indexer),
Rule::PreviewTestRule => test_rules::PreviewTestRule::diagnostic(locator, indexer),
Rule::DeprecatedTestRule => {
test_rules::DeprecatedTestRule::diagnostic(locator, indexer)
}
Rule::AnotherDeprecatedTestRule => {
test_rules::AnotherDeprecatedTestRule::diagnostic(locator, indexer)
}
Rule::RemovedTestRule => test_rules::RemovedTestRule::diagnostic(locator, indexer),
Rule::AnotherRemovedTestRule => {
test_rules::AnotherRemovedTestRule::diagnostic(locator, indexer)
}
_ => unreachable!("All test rules must have an implementation"),
};
if let Some(diagnostic) = diagnostic {