Skip to content

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

fix: prevent false positive "quite" → "quiet" (#3560) (#3575)

jdgajjar601f8bfd3629
diff --git a/harper-core/src/linting/quite_quiet.rs b/harper-core/src/linting/quite_quiet.rs
index e212e8874..6306d273c 100644
--- a/harper-core/src/linting/quite_quiet.rs
+++ b/harper-core/src/linting/quite_quiet.rs
@@ -40,7 +40,14 @@ impl Default for QuiteQuiet {
let adverb_quite = SequenceExpr::default()
.then_kind_except(
TokenKind::is_adverb,
- &["actually", "never", "not", "really", "generally"],
+ &[
+ "actually",
+ "never",
+ "not",
+ "probably",
+ "really",
+ "generally",
+ ],
)
.t_ws()
.t_aco("quite");
@@ -339,4 +346,29 @@ mod tests {
"That was quite impressive.",
);
}
+
+ // --- Issue #3560: "probably quite" should not be flagged ---
+
+ #[test]
+ fn dont_flag_probably_quite_doable_3560() {
+ assert_no_lints("It's probably quite doable.", QuiteQuiet::default());
+ }
+
+ #[test]
+ fn dont_flag_probably_quite_reasonable_3560() {
+ assert_no_lints(
+ "That seems probably quite reasonable.",
+ QuiteQuiet::default(),
+ );
+ }
+
+ #[test]
+ fn dont_flag_quite_happy_3560() {
+ assert_no_lints("I'm quite happy with the result.", QuiteQuiet::default());
+ }
+
+ #[test]
+ fn dont_flag_quite_large_3560() {
+ assert_no_lints("The project is quite large.", QuiteQuiet::default());
+ }
}