mirror of https://github.com/astral-sh/ruff
Test that more specific select wins over less specific ignore
This commit is contained in:
parent
1cd206285e
commit
a92958f941
|
|
@ -412,6 +412,14 @@ mod tests {
|
|||
let expected = FxHashSet::from_iter([Rule::DocLineTooLong, Rule::InvalidEscapeSequence]);
|
||||
assert_eq!(actual, expected);
|
||||
|
||||
let actual = resolve_rules(Configuration {
|
||||
select: Some(vec![RuleCodePrefix::W292.into()]),
|
||||
ignore: Some(vec![RuleCodePrefix::W.into()]),
|
||||
..Configuration::default()
|
||||
});
|
||||
let expected = FxHashSet::from_iter([Rule::NoNewLineAtEndOfFile]);
|
||||
assert_eq!(actual, expected);
|
||||
|
||||
let actual = resolve_rules(Configuration {
|
||||
select: Some(vec![RuleCodePrefix::W605.into()]),
|
||||
ignore: Some(vec![RuleCodePrefix::W605.into()]),
|
||||
|
|
|
|||
Loading…
Reference in New Issue