Skip to content

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

feat: seize control over→seize control of (#4515)

Andrew Dunbar5d97f059ab90
diff --git a/harper-core/default_config.json b/harper-core/default_config.json
index 3b189d9e6..4ea74c3a8 100644
--- a/harper-core/default_config.json
+++ b/harper-core/default_config.json
@@ -1408,6 +1408,13 @@
"label": "Seam To Seem"
}
},
+ {
+ "Bool": {
+ "name": "SeizeControlOf",
+ "state": true,
+ "label": "Seize Control of"
+ }
+ },
{
"Bool": {
"name": "SubjunctiveWasToWere",
diff --git a/harper-core/src/linting/phrase_set_corrections/many_to_many_tests.rs b/harper-core/src/linting/phrase_set_corrections/many_to_many_tests.rs
index c13549a46..365a1ff71 100644
--- a/harper-core/src/linting/phrase_set_corrections/many_to_many_tests.rs
+++ b/harper-core/src/linting/phrase_set_corrections/many_to_many_tests.rs
@@ -1473,6 +1473,80 @@ fn fix_reversed_engineers_noun() {
);
}
+// SeizeControlOf
+
+#[test]
+fn fix_seize_control() {
+ assert_suggestion_result(
+ "ninja token addresses were blocked from future activities to seize control over the network",
+ test_linter(),
+ "ninja token addresses were blocked from future activities to seize control of the network",
+ )
+}
+
+#[test]
+fn fix_sieze_control() {
+ assert_suggestion_result(
+ "The problem is that by choosing to sieze control over distribution is that they now cannot sieze control over production without breaking their ...",
+ test_linter(),
+ "The problem is that by choosing to seize control of distribution is that they now cannot seize control of production without breaking their ...",
+ )
+}
+
+#[test]
+fn fix_seized_control() {
+ assert_suggestion_result(
+ "part of a revolution in self-publishing as artists and poets seized control over the dissemination of their work",
+ test_linter(),
+ "part of a revolution in self-publishing as artists and poets seized control of the dissemination of their work",
+ )
+}
+
+#[test]
+fn fix_siezed_control() {
+ assert_suggestion_result(
+ "You siezed control over a large portion of the Ferelden hinterlands that you never gave back, you occupy a castle that's technically on ...",
+ test_linter(),
+ "You seized control of a large portion of the Ferelden hinterlands that you never gave back, you occupy a castle that's technically on ...",
+ )
+}
+
+#[test]
+fn fix_seizes_control() {
+ assert_suggestion_result(
+ "Former Brigadier-General Ansumane Mané seizes control over military barracks in Bissau, marking the beginning of the Guinea-Bissau Civil War",
+ test_linter(),
+ "Former Brigadier-General Ansumane Mané seizes control of military barracks in Bissau, marking the beginning of the Guinea-Bissau Civil War",
+ )
+}
+
+#[test]
+fn fix_siezes_control() {
+ assert_suggestion_result(
+ "The Obsidian's mech forces the other player into coexistence and siezes control over the planet when they flip from the Firmament.",
+ test_linter(),
+ "The Obsidian's mech forces the other player into coexistence and seizes control of the planet when they flip from the Firmament.",
+ )
+}
+
+#[test]
+fn fix_seizing_control() {
+ assert_suggestion_result(
+ "... by either shooting them or seizing control over them by creating connections in a short subgame",
+ test_linter(),
+ "... by either shooting them or seizing control of them by creating connections in a short subgame",
+ )
+}
+
+#[test]
+fn fix_siezing_control() {
+ assert_suggestion_result(
+ "Siezing control over the internet is the modern day equivalent of 'siezing the means of production.'.",
+ test_linter(),
+ "Seizing control of the internet is the modern day equivalent of 'siezing the means of production.'.",
+ )
+}
+
// SideTangent
#[test]
diff --git a/harper-core/src/linting/phrase_set_corrections/mod.rs b/harper-core/src/linting/phrase_set_corrections/mod.rs
index 429fa6111..b71eccfb1 100644
--- a/harper-core/src/linting/phrase_set_corrections/mod.rs
+++ b/harper-core/src/linting/phrase_set_corrections/mod.rs
@@ -1108,6 +1108,17 @@ pub fn lint_group() -> LintGroup {
"Corrects `rise the question` to `raise the question`.",
LintKind::Grammar
),
+ "SeizeControlOf" => (
+ &[
+ (&["seize control over", "sieze control over"], &["seize control of"]),
+ (&["seized control over", "siezed control over"], &["seized control of"]),
+ (&["seizes control over", "siezes control over"], &["seizes control of"]),
+ (&["seizing control over", "siezing control over"], &["seizing control of"]),
+ ],
+ "The standard preposition with the verb `seize` is `of`.",
+ "Corrects `seize control over` to `seize control of`.",
+ LintKind::Usage
+ ),
"SideTangent" => (
&[
(&["a side tangent"], &["a tangent", "an aside"]),