Offline, privacy-first grammar checker. Fast, open-source, Rust-powered
feat: reversed engineer → reverse engineer (#4312)
Andrew Dunbar9fe422dbfddc
diff --git a/harper-core/default_config.json b/harper-core/default_config.jsonindex 39f2a0e68..3283a0670 100644--- a/harper-core/default_config.json+++ b/harper-core/default_config.json@@ -3826,6 +3826,12 @@"label": "Relay On For Rely"}},+ {+ "Bool": {+ "name": "ReverseEngineer",+ "state": true+ }+ },{"Bool": {"name": "RulesOfThumb",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.rsindex 5eadce866..edfb2e1ba 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@@ -1237,6 +1237,80 @@ fn detect_arisen_the_question() {);}+// ReverseEngineer++#[test]+fn fix_reversed_engineer_present() {+ assert_suggestion_result(+ "you will save a lot of time if you don't have to reversed engineer encryption and checksums",+ test_linter(),+ "you will save a lot of time if you don't have to reverse engineer encryption and checksums",+ );+}++#[test]+fn fix_reversed_engineer_past() {+ assert_suggestion_result(+ "The codes is taking the reversed engineer SEED value from GOZ family codes",+ test_linter(),+ "The codes is taking the reverse engineered SEED value from GOZ family codes",+ )+}++#[test]+fn fix_reversed_engineer_hyphen_past() {+ assert_suggestion_result(+ "We reversed-engineer and traced the reviews that were displayed at the time to each reviewer at the time each review was being composed.",+ test_linter(),+ "We reverse-engineered and traced the reviews that were displayed at the time to each reviewer at the time each review was being composed.",+ );+}++#[test]+fn fix_reversed_engineered() {+ assert_suggestion_result(+ "I reversed engineered the TIDAL device authorization grant (RFC 8628) since the web flow (RFC 6749) is reCaptcha v3 secured.",+ test_linter(),+ "I reverse engineered the TIDAL device authorization grant (RFC 8628) since the web flow (RFC 6749) is reCaptcha v3 secured.",+ );+}++#[test]+fn fix_reversed_engineered_hyphen() {+ assert_suggestion_result(+ "This is a reversed-engineered server for Card Wars Kingdom, designed for version 1.0.17",+ test_linter(),+ "This is a reverse-engineered server for Card Wars Kingdom, designed for version 1.0.17",+ );+}++#[test]+fn fix_reversed_engineering() {+ assert_suggestion_result(+ "Im not sure how this works but it is probably vulnerable to reversed engineering attack.",+ test_linter(),+ "Im not sure how this works but it is probably vulnerable to reverse engineering attack.",+ );+}++#[test]+fn fix_reversed_engineers_verb() {+ assert_suggestion_result(+ "... managed to create a mini-arc reactor was because had blue prints for the original and kind of reversed engineers it",+ test_linter(),+ "... managed to create a mini-arc reactor was because had blue prints for the original and kind of reverse engineers it",+ );+}++#[test]+fn fix_reversed_engineers_noun() {+ assert_suggestion_result(+ "Expert reversed engineers with 2-15 years of industrial experience at BlueSurf Technologies.",+ test_linter(),+ "Expert reverse engineers with 2-15 years of industrial experience at BlueSurf Technologies.",+ );+}+// SideTangent#[test]diff --git a/harper-core/src/linting/phrase_set_corrections/mod.rs b/harper-core/src/linting/phrase_set_corrections/mod.rsindex 4079275af..818c20cd6 100644--- a/harper-core/src/linting/phrase_set_corrections/mod.rs+++ b/harper-core/src/linting/phrase_set_corrections/mod.rs@@ -1014,6 +1014,23 @@ pub fn lint_group() -> LintGroup {"Corrects `play a factor` to `play a part` or `be a factor`.",LintKind::Usage),+ "ReverseEngineer" => (+ &[+ // The past tense ending is put on 'reverse' instead of 'engineer'+ // But sometimes it's just '-ed' on every tense+ (&["reversed engineer"], &["reverse engineered", "reverse engineer"]),+ (&["reversed-engineer"], &["reverse-engineered", "reverse-engineer"]),+ (&["reversed engineered"], &["reverse engineered"]),+ (&["reversed-engineered"], &["reverse-engineered"]),+ (&["reversed engineering"], &["reverse engineering"]),+ (&["reversed-engineering"], &["reverse-engineering"]),+ (&["reversed engineers"], &["reverse engineers"]),+ (&["reversed-engineers"], &["reverse-engineers"]),+ ],+ "The correct term is `reverse engineer`.",+ "Corrects `reversed engineer` to `reverse engineer`.",+ LintKind::Grammar+ ),"RiseTheQuestion" => (&[(&["rise the question", "arise the question"], &["raise the question"]),