Skip to content

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

feat: provocate → provoke (#4278)

Andrew Dunbar56eeaa64f7c4
diff --git a/harper-core/default_config.json b/harper-core/default_config.json
index 12f06afd2..a3bebee98 100644
--- a/harper-core/default_config.json
+++ b/harper-core/default_config.json
@@ -1310,6 +1310,13 @@
"label": "Piggyback"
}
},
+ {
+ "Bool": {
+ "name": "Provocate",
+ "state": true,
+ "label": "Provocate"
+ }
+ },
{
"Bool": {
"name": "RedundantSuperlatives",
diff --git a/harper-core/src/linting/phrase_set_corrections/mod.rs b/harper-core/src/linting/phrase_set_corrections/mod.rs
index 7a9349a8d..486b149a5 100644
--- a/harper-core/src/linting/phrase_set_corrections/mod.rs
+++ b/harper-core/src/linting/phrase_set_corrections/mod.rs
@@ -582,6 +582,17 @@ pub fn lint_group() -> LintGroup {
"Corrects the eggcorn `piggy bag` to `piggyback`, which is the proper term for riding on someone’s back or using an existing system.",
LintKind::Eggcorn
),
+ "Provocate" => (
+ &[
+ ("provocate", "provoke"),
+ ("provocated", "provoked"),
+ ("provocates", "provokes"),
+ ("provocating", "provoking"),
+ ],
+ "Did you mean `provoke`?",
+ "Corrects the misspelling `provocate` to `provoke`.",
+ LintKind::WordChoice
+ ),
// Redundant degree modifiers on positives (double positives) → base form
"RedundantSuperlatives" => (
&[
diff --git a/harper-core/src/linting/phrase_set_corrections/tests.rs b/harper-core/src/linting/phrase_set_corrections/tests.rs
index 4112d2301..44c10ef06 100644
--- a/harper-core/src/linting/phrase_set_corrections/tests.rs
+++ b/harper-core/src/linting/phrase_set_corrections/tests.rs
@@ -1700,6 +1700,44 @@ fn fix_peaks() {
// Piggyback
// -none-
+// Provocate
+
+#[test]
+fn fix_provocate() {
+ assert_suggestion_result(
+ "Hardcoded chainId can provocate a possible replay attacks between chains in the event of a future chain split.",
+ test_linter(),
+ "Hardcoded chainId can provoke a possible replay attacks between chains in the event of a future chain split.",
+ );
+}
+
+#[test]
+fn fix_provocated() {
+ assert_suggestion_result(
+ "tempering with inconsistent content lengths provocated the error which lead me to encoding?",
+ test_linter(),
+ "tempering with inconsistent content lengths provoked the error which lead me to encoding?",
+ );
+}
+
+#[test]
+fn fix_provocates() {
+ assert_suggestion_result(
+ "it wont mark the check on the solving square, it provocates a timeout and return 500 Server Error",
+ test_linter(),
+ "it wont mark the check on the solving square, it provokes a timeout and return 500 Server Error",
+ );
+}
+
+#[test]
+fn fix_provocating() {
+ assert_suggestion_result(
+ "could return incorrect balances provocating an incorrect calculation of rsETH price",
+ test_linter(),
+ "could return incorrect balances provoking an incorrect calculation of rsETH price",
+ );
+}
+
// RedundantSuperlatives
#[test]