Skip to content

Offline, privacy-first grammar checker. Fast, open-source, Rust-powered

fix: don't flag "no two" etc. (#2489)

Andrew Dunbarb0771401b873
diff --git a/harper-core/src/linting/quantifier_numeral_conflict.rs b/harper-core/src/linting/quantifier_numeral_conflict.rs
index b2c908758..986802a0f 100644
--- a/harper-core/src/linting/quantifier_numeral_conflict.rs
+++ b/harper-core/src/linting/quantifier_numeral_conflict.rs
@@ -24,9 +24,9 @@ impl Default for QuantifierNumeralConflict {
),
Box::new(
SequenceExpr::default().then_unless(SequenceExpr::any_of(vec![
- Box::new(WordSet::new(&["all", "any", "every"])),
+ Box::new(WordSet::new(&["all", "any", "every", "no"])),
Box::new(
- SequenceExpr::word_set(&["each", "no", "some"])
+ SequenceExpr::word_set(&["each", "some"])
.t_ws()
.t_aco("one"),
),
@@ -176,4 +176,12 @@ mod tests {
"OSSEC by default run rootkit check every 2 hours.",
);
}
+
+ #[test]
+ fn ignore_no_two_adjacent_characters_2486() {
+ assert_no_lints(
+ "No two adjacent characters are the same.",
+ QuantifierNumeralConflict::default(),
+ );
+ }
}