Offline, privacy-first grammar checker. Fast, open-source, Rust-powered
fix: remove dupes and remnants of lints moved from `phrase_corrections` to `OpenCompounds` (#1976)
Andrew Dunbar7851bd1ca25f
diff --git a/harper-core/src/linting/open_compounds.rs b/harper-core/src/linting/open_compounds.rsindex d060da82f..054ee646f 100644--- a/harper-core/src/linting/open_compounds.rs+++ b/harper-core/src/linting/open_compounds.rs@@ -102,7 +102,7 @@ impl ExprLinter for OpenCompounds {Some(Lint {span,- lint_kind: LintKind::WordChoice,+ lint_kind: LintKind::BoundaryError,suggestions: vec![Suggestion::replace_with_match_case(phrase.chars().collect(),span.get_content(source_chars),diff --git a/harper-core/src/linting/phrase_corrections/mod.rs b/harper-core/src/linting/phrase_corrections/mod.rsindex 3b8c242ea..2f9564e61 100644--- a/harper-core/src/linting/phrase_corrections/mod.rs+++ b/harper-core/src/linting/phrase_corrections/mod.rs@@ -155,13 +155,6 @@ pub fn lint_group() -> LintGroup {"Corrects `as of lately` to `as of late`.",LintKind::WordChoice),- "AsWell" => (- ["aswell"],- ["as well"],- "`as well` should be written as two words.",- "Corrects `aswell` to `as well`.",- LintKind::BoundaryError- ),"AtFaceValue" => (["on face value"],["at face value"],@@ -606,13 +599,6 @@ pub fn lint_group() -> LintGroup {"Corrects the missing article in `in while`, forming `in a while`.",LintKind::Grammar),- "InCase" => (- ["incase"],- ["in case"],- "`In case` should be written as two words.",- "Corrects `incase` to `in case`.",- LintKind::BoundaryError- ),"InNeedOf" => (["in need for"],["in need of"],@@ -1030,11 +1016,11 @@ pub fn lint_group() -> LintGroup {LintKind::Usage),"ThanksALot" => (- ["thanks lot", "thanks alot"],+ ["thanks lot"],["thanks a lot"],- "Prefer the two-word expression `thanks a lot`.",- "`Thanks a lot` is the fixed, widely accepted form, while variants like `thanks lot` or `thanks alot` are non-standard and can jar readers.",- LintKind::Usage+ "The indefinite article `a` is required in `thanks a lot`.",+ "Corrects the missing article in `thanks lot`, forming `thanks a lot`.",+ LintKind::Grammar),"ThatChallenged" => (["the challenged"],diff --git a/harper-core/src/linting/phrase_corrections/tests.rs b/harper-core/src/linting/phrase_corrections/tests.rsindex df86a9546..f0f367c6c 100644--- a/harper-core/src/linting/phrase_corrections/tests.rs+++ b/harper-core/src/linting/phrase_corrections/tests.rs@@ -184,9 +184,6 @@ fn corrects_as_of_lately() {)}-// AsWell-// -none--// AtFaceValue#[test]fn correct_on_face_value() {@@ -695,9 +692,6 @@ fn test_in_a_while() {);}-// InCase-// -none--// InNeedOf#[test]fn corrects_in_need_of() {@@ -1460,11 +1454,6 @@ fn thanks_lot() {assert_suggestion_result("thanks lot", lint_group(), "thanks a lot");}-#[test]-fn thanks_alot() {- assert_suggestion_result("thanks alot", lint_group(), "thanks a lot");-}-#[test]fn thanks_a_lot_clean() {assert_lint_count("thanks a lot", lint_group(), 0);