mirror of
https://github.com/Automattic/harper.git
synced 2025-12-05 19:26:55 -06:00
feat(core): add rule to fix vary much
This commit is contained in:
@@ -669,16 +669,6 @@ mod tests {
|
||||
assert_no_lints("It's awesome", test_group());
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn vary_to_very_correction() {
|
||||
use crate::linting::tests::assert_suggestion_result;
|
||||
assert_suggestion_result(
|
||||
"I love you vary much.",
|
||||
test_group(),
|
||||
"I love you very much.",
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn the_to_that_respects() {
|
||||
use crate::linting::tests::assert_suggestion_result;
|
||||
|
||||
@@ -204,6 +204,13 @@ pub fn lint_group() -> LintGroup {
|
||||
"Fixes `back and call` to `beck and call`.",
|
||||
LintKind::Eggcorn
|
||||
),
|
||||
"VaryMuch" => (
|
||||
["vary much"],
|
||||
["very much"],
|
||||
"Did you mean `very much`?",
|
||||
"Corrects the common typo `vary much` to `very much`.",
|
||||
LintKind::Typo
|
||||
),
|
||||
"BeenThere" => (
|
||||
["bee there"],
|
||||
["been there"],
|
||||
|
||||
@@ -202,6 +202,16 @@ fn baited_breath() {
|
||||
// BeckAndCall
|
||||
// -none-
|
||||
|
||||
// VaryMuch
|
||||
#[test]
|
||||
fn correct_vary_much() {
|
||||
assert_suggestion_result(
|
||||
"I love you vary much.",
|
||||
lint_group(),
|
||||
"I love you very much.",
|
||||
);
|
||||
}
|
||||
|
||||
// BeenThere
|
||||
// -none-
|
||||
|
||||
|
||||
Reference in New Issue
Block a user