Offline, privacy-first grammar checker. Fast, open-source, Rust-powered
fix: don't flag "should soft-fork" (#3171)
Andrew Dunbare2f8e2812aa6
diff --git a/harper-core/src/linting/modal_be_adjective.rs b/harper-core/src/linting/modal_be_adjective.rsindex 4f0db3c55..14862205e 100644--- a/harper-core/src/linting/modal_be_adjective.rs+++ b/harper-core/src/linting/modal_be_adjective.rs@@ -3,7 +3,7 @@ use crate::{expr::{Expr, SequenceExpr},linting::{ExprLinter, Suggestion,- expr_linter::{Chunk, followed_by_word},+ expr_linter::{Chunk, followed_by_hyphen, followed_by_word},},patterns::ModalVerb,};@@ -54,7 +54,8 @@ impl ExprLinter for ModalBeAdjective {.get_ch(src).eq_any_ignore_ascii_case_str(&["at", "by", "if"]))|| (toks.last().unwrap().get_ch(src).eq_str("kind") && nw.get_ch(src).eq_str("of"))- }) {+ }) || followed_by_hyphen(ctx)+ {return None;}@@ -147,4 +148,12 @@ mod tests {ModalBeAdjective::default(),);}++ #[test]+ fn ignore_soft_fork_3168() {+ assert_no_lints(+ "You should soft-fork the repository.",+ ModalBeAdjective::default(),+ );+ }}