Offline, privacy-first grammar checker. Fast, open-source, Rust-powered
fix: #1956 (#1958)
Andrew Dunbar5bba33a26e47
diff --git a/harper-core/src/linting/quite_quiet.rs b/harper-core/src/linting/quite_quiet.rsindex e7924b0fd..9d7aad6d5 100644--- a/harper-core/src/linting/quite_quiet.rs+++ b/harper-core/src/linting/quite_quiet.rs@@ -18,7 +18,7 @@ impl Default for QuiteQuiet {TokenKind::is_verb,] as &[_],TokenKind::is_noun,- &["here", "not", "up"],+ &["here", "up"],);let negative_contraction_quiet = SequenceExpr::default()@@ -34,7 +34,7 @@ impl Default for QuiteQuiet {.t_aco("quiet");let adverb_quite = SequenceExpr::default()- .then_kind_except(TokenKind::is_adverb, &["never"])+ .then_kind_except(TokenKind::is_adverb, &["never", "not"]).t_ws().t_aco("quite");@@ -116,7 +116,7 @@ impl ExprLinter for QuiteQuiet {#[cfg(test)]mod tests {use super::QuiteQuiet;- use crate::linting::tests::{assert_lint_count, assert_suggestion_result};+ use crate::linting::tests::{assert_lint_count, assert_no_lints, assert_suggestion_result};#[test]fn fix_quiet_adverb() {@@ -204,4 +204,9 @@ mod tests {"I couldn't quite understand everything",);}++ #[test]+ fn fix_but_its_not_quite_clear_1956() {+ assert_no_lints("But it's not quite clear", QuiteQuiet::default());+ }}diff --git a/harper-core/tests/text/linters/Alice's Adventures in Wonderland.snap.yml b/harper-core/tests/text/linters/Alice's Adventures in Wonderland.snap.ymlindex b925ecc74..0d2820da6 100644--- a/harper-core/tests/text/linters/Alice's Adventures in Wonderland.snap.yml+++ b/harper-core/tests/text/linters/Alice's Adventures in Wonderland.snap.yml@@ -1335,15 +1335,6 @@ Suggest:-Lint: Typo (63 priority)-Message: |- 906 | “Not quite right, I’m afraid,” said Alice, timidly; “some of the words have got- | ^~~~~ After an adverb like 'Not', use 'quiet' not 'quite'-Suggest:- - Replace with: “quiet”---Lint: Enhancement (31 priority)Message: |929 | “It is a very good height indeed!” said the Caterpillar angrily, rearing itself@@ -1534,16 +1525,6 @@ Message: |-Lint: Typo (63 priority)-Message: |- 1144 | “Please would you tell me,” said Alice, a little timidly, for she was not quite- | ^~~~~ After an adverb like 'not', use 'quiet' not 'quite'- 1145 | sure whether it was good manners for her to speak first, “why your cat grins-Suggest:- - Replace with: “quiet”---Lint: Readability (127 priority)Message: |1165 | well to introduce some other subject of conversation. While she was trying to@@ -1797,15 +1778,6 @@ Suggest:-Lint: Typo (63 priority)-Message: |- 1584 | Alice did not quite know what to say to this: so she helped herself to some tea- | ^~~~~ After an adverb like 'not', use 'quiet' not 'quite'-Suggest:- - Replace with: “quiet”---Lint: Readability (127 priority)Message: |1637 | The Dormouse had closed its eyes by this time, and was going off into a doze;@@ -2295,16 +2267,6 @@ Suggest:-Lint: Typo (63 priority)-Message: |- 2095 | leaving Alice alone with the Gryphon. Alice did not quite like the look of the- | ^~~~~ After an adverb like 'not', use 'quiet' not 'quite'- 2096 | creature, but on the whole she thought it would be quite as safe to stay with it-Suggest:- - Replace with: “quiet”---Lint: Spelling (63 priority)Message: |2099 | The Gryphon sat up and rubbed its eyes: then it watched the Queen till she wasdiff --git a/harper-core/tests/text/linters/The Great Gatsby.snap.yml b/harper-core/tests/text/linters/The Great Gatsby.snap.ymlindex eed4a9bfb..fe1bd5221 100644--- a/harper-core/tests/text/linters/The Great Gatsby.snap.yml+++ b/harper-core/tests/text/linters/The Great Gatsby.snap.yml@@ -882,16 +882,6 @@ Suggest:-Lint: Typo (63 priority)-Message: |- 767 | So Tom Buchanan and his girl and I went up together to New York—or not quite- | ^~~~~ After an adverb like 'not', use 'quiet' not 'quite'- 768 | together, for Mrs. Wilson sat discreetly in another car. Tom deferred that much-Suggest:- - Replace with: “quiet”---Lint: Spelling (63 priority)Message: |768 | together, for Mrs. Wilson sat discreetly in another car. Tom deferred that much@@ -1912,15 +1902,6 @@ Suggest:-Lint: Typo (63 priority)-Message: |- 1640 | But as I walked down the steps I saw that the evening was not quite over. Fifty- | ^~~~~ After an adverb like 'not', use 'quiet' not 'quite'-Suggest:- - Replace with: “quiet”---Lint: Spelling (63 priority)Message: |1642 | scene. In the ditch beside the road, right side up, but violently shorn of one