Skip to content

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

feat: aslong as→as long as (#1974)

Andrew Dunbarc237f22a93e0
diff --git a/harper-core/src/linting/phrase_corrections/mod.rs b/harper-core/src/linting/phrase_corrections/mod.rs
index ea823e5bb..3b8c242ea 100644
--- a/harper-core/src/linting/phrase_corrections/mod.rs
+++ b/harper-core/src/linting/phrase_corrections/mod.rs
@@ -141,6 +141,13 @@ pub fn lint_group() -> LintGroup {
"Corrects `as it so happens` to `as it happens`.",
LintKind::Usage
),
+ "AsLongAs" => (
+ ["aslong as"],
+ ["as long as"],
+ "`As long` should be written as two words.",
+ "Corrects `aslong as` to `as long as`.",
+ LintKind::BoundaryError
+ ),
"AsOfLate" => (
["as of lately"],
["as of late"],
diff --git a/harper-core/src/linting/phrase_corrections/tests.rs b/harper-core/src/linting/phrase_corrections/tests.rs
index ef8d52b32..df86a9546 100644
--- a/harper-core/src/linting/phrase_corrections/tests.rs
+++ b/harper-core/src/linting/phrase_corrections/tests.rs
@@ -164,6 +164,16 @@ fn correct_as_it_happens() {
);
}
+// AsLongAs
+#[test]
+fn correct_as_long_as() {
+ assert_suggestion_result(
+ "server loads up fine but cant log on client side aslong as the plugin is installed",
+ lint_group(),
+ "server loads up fine but cant log on client side as long as the plugin is installed",
+ );
+}
+
// AsOfLate
#[test]
fn corrects_as_of_lately() {