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

@ -909,7 +909,15 @@ impl LintConfiguration {
}
// Check if the selector is empty because preview mode is disabled
if selector.rules(&PreviewOptions::default()).next().is_none() {
if selector.rules(&preview).next().is_none()
&& selector
.rules(&PreviewOptions {
mode: PreviewMode::Enabled,
require_explicit: preview.require_explicit,
})
.next()
.is_some()
{
ignored_preview_selectors.insert(selector);
}
}