Skip to content

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

feat: incase→in case

hippietrail6ca93f653932
diff --git a/harper-core/src/linting/phrase_corrections.rs b/harper-core/src/linting/phrase_corrections.rs
index 9ad7b4368..a59a1333b 100644
--- a/harper-core/src/linting/phrase_corrections.rs
+++ b/harper-core/src/linting/phrase_corrections.rs
@@ -1074,6 +1074,12 @@ pub fn lint_group() -> LintGroup {
"Did you mean the verb `passed`?",
"Suggests `past` for `passed` in case a verb was intended."
),
+ "InCase" => (
+ ["incase"],
+ ["in case"],
+ "`In case` should be written as two words.",
+ "Corrects `incase` to `in case`."
+ ),
});
group.set_all_rules_to(Some(true));
@@ -2194,4 +2200,13 @@ mod tests {
"Return to computer, with enough time having passed for the computer to go to full sleep.",
);
}
+
+ #[test]
+ fn correct_in_case() {
+ assert_suggestion_result(
+ "Support for enum variable incase of reusable enum class",
+ lint_group(),
+ "Support for enum variable in case of reusable enum class",
+ );
+ }
}