Offline, privacy-first grammar checker. Fast, open-source, Rust-powered
fix: 3 more false positives: bottom, shadow, short
hippietrail5affe3a75354
diff --git a/harper-core/src/linting/adjective_of_a.rs b/harper-core/src/linting/adjective_of_a.rsindex 037be5885..6cf8c8ad6 100644--- a/harper-core/src/linting/adjective_of_a.rs+++ b/harper-core/src/linting/adjective_of_a.rs@@ -27,10 +27,13 @@ impl Linter for AdjectiveOfA {['o', 'u', 't'] | ['O', 'u', 't'] => true,// The word is used more as a noun in this context.// (using .kind.is_likely_homograph() here is too strict)+ ['b', 'o', 't', 't', 'o', 'm'] | ['B', 'o', 't', 't', 'o', 'm'] => true,['f', 'r', 'o', 'n', 't'] | ['F', 'r', 'o', 'n', 't'] => true,['k', 'i', 'n', 'd'] | ['K', 'i', 'n', 'd'] => true,['m', 'e', 'a', 'n', 'i', 'n', 'g'] | ['M', 'e', 'a', 'n', 'i', 'n', 'g'] => true,['p', 'a', 'r', 't'] | ['P', 'a', 'r', 't'] => true,+ ['s', 'h', 'a', 'd', 'o', 'w'] | ['S', 'h', 'a', 'd', 'o', 'w'] => true,+ ['s', 'h', 'o', 'r', 't'] | ['S', 'h', 'o', 'r', 't'] => true,['s', 'o', 'm', 'e', 't', 'h', 'i', 'n', 'g']| ['S', 'o', 'm', 'e', 't', 'h', 'i', 'n', 'g'] => true,// TODO: consider "more of a" and "less of a" but they may have too many true positives@@ -229,4 +232,22 @@ mod tests {0,);}++ #[test]+ fn dont_flag_short() {+ assert_lint_count(+ "I found one Youtube short of an indonesian girl.",+ AdjectiveOfA,+ 0,+ )+ }++ #[test]+ fn dont_flag_bottom() {+ assert_lint_count(+ "When leaves are just like coming out individually from the bottom of a fruit.",+ AdjectiveOfA,+ 0,+ )+ }}