feat(core): add rule to fix vary much

This commit is contained in:
Elijah Potter
2025-09-09 14:34:18 -06:00
parent c09a5a5cc9
commit 1a4b264dbf
3 changed files with 17 additions and 10 deletions

View File

@@ -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;

View File

@@ -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"],

View File

@@ -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-