Skip to content

Offline, privacy-first grammar checker. Fast, open-source, Rust-powered

fix: add missing "gotten rid off" to other "rid off"

hippietrailba42869b3662
diff --git a/harper-core/src/linting/phrase_corrections.rs b/harper-core/src/linting/phrase_corrections.rs
index 6398946ac..31061816e 100644
--- a/harper-core/src/linting/phrase_corrections.rs
+++ b/harper-core/src/linting/phrase_corrections.rs
@@ -363,6 +363,12 @@ pub fn lint_group() -> LintGroup {
"Did you mean `got rid of`?",
"Ensures `got rid of` is used instead of `got rid off`."
),
+ "GottenRidOff" => (
+ ["gotten rid off"],
+ ["gotten rid of"],
+ "Did you mean `gotten rid of`?",
+ "Ensures `gotten rid of` is used instead of `gotten rid off`."
+ ),
"LastButNotLeast" => (
["last but not the least", "last, but not the least", "last but, not least"],
["last but not least"],
@@ -616,7 +622,6 @@ mod tests {
use super::lint_group;
- // todo: 4 tests: get/gets/getting rid off
#[test]
fn get_rid_off() {
assert_suggestion_result(
@@ -625,6 +630,8 @@ mod tests {
"Please bump axios version to get rid of npm warning #624",
);
}
+
+ #[test]
fn gets_rid_off() {
assert_suggestion_result(
"Adding at as a runtime dependency gets rid off that error",
@@ -632,6 +639,8 @@ mod tests {
"Adding at as a runtime dependency gets rid of that error",
);
}
+
+ #[test]
fn getting_rid_off() {
assert_suggestion_result(
"getting rid off of all the complexity of the different accesses method of API service providers",
@@ -639,6 +648,8 @@ mod tests {
"getting rid of of all the complexity of the different accesses method of API service providers",
);
}
+
+ #[test]
fn got_rid_off() {
assert_suggestion_result(
"For now we got rid off circular deps in model tree structure and it's API.",
@@ -647,6 +658,15 @@ mod tests {
);
}
+ #[test]
+ fn gotten_rid_off() {
+ assert_suggestion_result(
+ "The baX variable thingy I have gotten rid off, that was due to a bad character in the encryption key.",
+ lint_group(),
+ "The baX variable thingy I have gotten rid of, that was due to a bad character in the encryption key.",
+ );
+ }
+
#[test]
fn issue_574() {
assert_lint_count("run by one", lint_group(), 0);