Offline, privacy-first grammar checker. Fast, open-source, Rust-powered
feat: backward(s) engineer → reverse engineer (#4582)
Andrew Dunbar0d6b8698b634
diff --git a/harper-core/default_config.json b/harper-core/default_config.jsonindex 097386285..0954a4515 100644--- a/harper-core/default_config.json+++ b/harper-core/default_config.json@@ -3546,6 +3546,12 @@"label": "As To Interrogative"}},+ {+ "Bool": {+ "name": "BackwardEngineer",+ "state": true+ }+ },{"Bool": {"name": "Beforehand",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 62b789200..2e0518139 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@@ -71,6 +71,71 @@ fn correct_awaited_for() {);}+// BackwardEngineer++#[test]+fn backward_space_engineer() {+ assert_suggestion_result(+ "The idea would be to backward engineer such \"creation process\" to the extent given by tools and abilities.",+ test_linter(),+ "The idea would be to reverse engineer such \"creation process\" to the extent given by tools and abilities.",+ );+}++#[test]+fn backward_hyphen_engineer() {+ assert_suggestion_result(+ "Use Assignment 5 screenshots and R Manual to backward-engineer Motor Trend Car Road Tests data",+ test_linter(),+ "Use Assignment 5 screenshots and R Manual to reverse-engineer Motor Trend Car Road Tests data",+ );+}++#[test]+fn backward_hyphen_engineering() {+ assert_suggestion_result(+ "For the backward-engineering to work, I realize that the power spectra we have saved were done using these super high-accuracy settings",+ test_linter(),+ "For the reverse-engineering to work, I realize that the power spectra we have saved were done using these super high-accuracy settings",+ );+}++#[test]+fn backward_space_engineering() {+ assert_suggestion_result(+ "Note though, that CS is \"forward\" engineering, while Brain Science is backward engineering.",+ test_linter(),+ "Note though, that CS is \"forward\" engineering, while Brain Science is reverse engineering.",+ );+}++#[test]+fn backwards_hyphen_engineer() {+ assert_suggestion_result(+ "After leaving this talk, you'll be able to backwards-engineer these 'internal' APIs and replicate any trivial flow",+ test_linter(),+ "After leaving this talk, you'll be able to reverse-engineer these 'internal' APIs and replicate any trivial flow",+ );+}++#[test]+fn backwards_space_engineer() {+ assert_suggestion_result(+ "do this and you can backwards engineer what you should be getting",+ test_linter(),+ "do this and you can reverse engineer what you should be getting",+ );+}++#[test]+fn backwards_space_engineering() {+ assert_suggestion_result(+ "This chapter gives an overview the first assessment, the backwards engineering report along with the files you will need and some helpful hints.",+ test_linter(),+ "This chapter gives an overview the first assessment, the reverse engineering report along with the files you will need and some helpful hints.",+ );+}+// BackhandedCompliment#[test]diff --git a/harper-core/src/linting/phrase_set_corrections/mod.rs b/harper-core/src/linting/phrase_set_corrections/mod.rsindex ad1c0b5aa..caeada259 100644--- a/harper-core/src/linting/phrase_set_corrections/mod.rs+++ b/harper-core/src/linting/phrase_set_corrections/mod.rs@@ -831,6 +831,21 @@ pub fn lint_group() -> LintGroup {"Corrects `backhand compliment` to `backhanded compliment`.",LintKind::Spelling),+ "BackwardEngineer" => (+ &[+ (&["backward engineer", "backwards engineer"], &["reverse engineer"]),+ (&["backward engineers", "backwards engineers"], &["reverse engineers"]),+ (&["backward-engineer", "backwards-engineer"], &["reverse-engineer"]),+ (&["backward-engineers", "backwards-engineers"], &["reverse-engineers"]),+ (&["backward engineering", "backwards engineering"], &["reverse engineering"]),+ (&["backward-engineering", "backwards-engineering"], &["reverse-engineering"]),+ (&["backward engineered", "backwards engineered"], &["reverse engineered"]),+ (&["backward-engineered", "backwards-engineered"], &["reverse-engineered"]),+ ],+ "The much more common term is `reverse engineer`.",+ "Suggests changing the less common `backward/backwards engineer` to the more usual `reverse engineer`.",+ LintKind::WordChoice+ ),"BainBane" => (&[(&["bain of my existence","bain of my existance"], &["bane of my existence"]),