Skip to content

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

feat: straight forward → straightforward (#4343)

Andrew Dunbar3ed140f0a019
diff --git a/harper-core/default_config.json b/harper-core/default_config.json
index acc63f659..a60066482 100644
--- a/harper-core/default_config.json
+++ b/harper-core/default_config.json
@@ -733,6 +733,13 @@
"label": "Somewhere"
}
},
+ {
+ "Bool": {
+ "name": "Straightforward",
+ "state": true,
+ "label": "Straightforward"
+ }
+ },
{
"Bool": {
"name": "Tenfold",
@@ -4087,13 +4094,6 @@
"label": "Accuse of"
}
},
- {
- "Bool": {
- "name": "SlipperySlope",
- "state": true,
- "label": "Slippery Slope"
- }
- },
{
"Bool": {
"name": "AheadAnd",
@@ -5620,6 +5620,13 @@
"label": "Simple Grammatical"
}
},
+ {
+ "Bool": {
+ "name": "SlipperySlope",
+ "state": true,
+ "label": "Slippery Slope"
+ }
+ },
{
"Bool": {
"name": "SneakingSuspicion",
diff --git a/harper-core/src/linting/closed_compounds.rs b/harper-core/src/linting/closed_compounds.rs
index e9aebedbb..ed58a7571 100644
--- a/harper-core/src/linting/closed_compounds.rs
+++ b/harper-core/src/linting/closed_compounds.rs
@@ -72,6 +72,7 @@ pub fn lint_group() -> LintGroup {
"Somehow" => (&["some how"][..], "somehow"),
"Someone" => (&["some one"][..], "someone"),
"Somewhere" => (&["some where"][..], "somewhere"),
+ "Straightforward" => (&["straight forward"][..], "straightforward"),
"Tenfold" => (&["ten fold"][..], "tenfold"),
"There" => (&["the re"][..], "there"),
"Therefore" => (&["there fore"][..], "therefore"),
@@ -368,4 +369,13 @@ mod tests {
"Tools to visualize large codebases in different ways.",
)
}
+
+ #[test]
+ fn straightforward() {
+ assert_suggestion_result(
+ "This new vulnerability has a somewhat straight forward path to exploitation and prints funds out of thin air.",
+ lint_group(),
+ "This new vulnerability has a somewhat straightforward path to exploitation and prints funds out of thin air.",
+ )
+ }
}