Skip to content

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

fix(core): #574 by increasing the bar for similarity

Elijah Potter28b939598ed5
diff --git a/harper-core/src/linting/phrase_corrections.rs b/harper-core/src/linting/phrase_corrections.rs
index 344c06cad..bdb4c39d7 100644
--- a/harper-core/src/linting/phrase_corrections.rs
+++ b/harper-core/src/linting/phrase_corrections.rs
@@ -67,8 +67,8 @@ macro_rules! create_linter_for_phrase {
};
}
-create_linter_for_phrase!(TurnItOff, "turn it off", 2);
-create_linter_for_phrase!(HumanLife, "human life", 2);
+create_linter_for_phrase!(TurnItOff, "turn it off", 1);
+create_linter_for_phrase!(HumanLife, "human life", 1);
create_linter_for_phrase!(ThatChallenged, "that challenged", 2);
create_linter_for_phrase!(NoLonger, "no longer", 1);
create_linter_for_phrase!(NeedHelp, "need help", 1);
@@ -82,6 +82,11 @@ mod tests {
use super::{Decision, OfCourse, TurnItOff};
+ #[test]
+ fn issue_574() {
+ assert_lint_count("run by one", TurnItOff::default(), 0);
+ }
+
#[test]
fn turn_it_off_clean_lower() {
assert_lint_count("turn it off", TurnItOff::default(), 0);