mirror of
https://github.com/astral-sh/ruff.git
synced 2025-10-01 06:11:43 +00:00
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:
parent
e5008ca714
commit
46c0937bfa
5 changed files with 235 additions and 83 deletions
|
@ -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 {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue