Skip to content

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

feat: redundant self-level itself (#4778)

Andrew Dunbar19551243709c
diff --git a/harper-core/src/linting/redundant_self.rs b/harper-core/src/linting/redundant_self.rs
index 65a703a97..43413d2f9 100644
--- a/harper-core/src/linting/redundant_self.rs
+++ b/harper-core/src/linting/redundant_self.rs
@@ -49,6 +49,12 @@ impl Default for RedundantSelf {
"identified",
"identifies",
"identifying",
+ "level",
+ "leveled",
+ "leveling",
+ "levelled",
+ "levelling",
+ "levels",
"medicate",
"medicated",
"medicates",
@@ -788,4 +794,13 @@ mod tests {
"I'm on dudes side, the person that defended himself",
);
}
+
+ #[test]
+ fn fix_self_levels_itself() {
+ assert_suggestion_result(
+ "That's going to stop the fuel coming out of this tank and into the other two tanks because the fuel self-levels itself to keep the boat nice and flat.",
+ test_linter(),
+ "That's going to stop the fuel coming out of this tank and into the other two tanks because the fuel self-levels to keep the boat nice and flat.",
+ );
+ }
}