mirror of
https://github.com/Automattic/harper.git
synced 2025-12-23 08:48:15 +00:00
fix: remove dupes and remnants of lints moved from phrase_corrections to OpenCompounds (#1976)
This commit is contained in:
parent
ec370d9b7f
commit
7851bd1ca2
3 changed files with 5 additions and 30 deletions
|
|
@ -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),
|
||||
|
|
|
|||
|
|
@ -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"],
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue