Offline, privacy-first grammar checker. Fast, open-source, Rust-powered
feat: add "standard option" to `Oxymorons` (#3651)
Andrew Dunbar6b424986fb5a
diff --git a/harper-core/src/linting/oxymorons.rs b/harper-core/src/linting/oxymorons.rsindex 1a3172ccc..8e6c68b46 100644--- a/harper-core/src/linting/oxymorons.rs+++ b/harper-core/src/linting/oxymorons.rs@@ -14,23 +14,24 @@ impl Oxymorons {pub fn new() -> Self {// List of phrases that are considered oxymoronic.let phrases = vec![- "amateur expert",- "increasingly less",- "advancing backwards?",+ "advancing backwards","alludes explicitly to",- "explicitly alludes to",- "totally obsolescent",- "completely obsolescent",- "generally always",- "usually always",+ "amateur expert","build down",+ "completely obsolescent","conspicuous absence","exact estimate",+ "explicitly alludes to","found missing",+ "generally always",+ "increasingly less","intense apathy","mandatory choice","nonworking mother","organized mess",+ "standard Option",+ "totally obsolescent",+ "usually always",];// Build a vector of exact-match patterns for each oxymoron.@@ -145,4 +146,13 @@ mod tests {1,);}++ #[test]+ fn detects_standard_option() {+ assert_lint_count(+ "and that probably correlates with CD players becoming a standard option in cars",+ Oxymorons::new(),+ 1,+ );+ }}