Skip to content

Commit

Permalink
Test that more specific select wins over less specific ignore
Browse files Browse the repository at this point in the history
  • Loading branch information
not-my-profile committed Jan 28, 2023
1 parent 8368f5c commit 7b071f5
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/settings/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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()]),
Expand Down

0 comments on commit 7b071f5

Please sign in to comment.