Skip to content

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

feat: make senses→make sense (#2330)

Andrew Dunbar433829f3b8e2
diff --git a/harper-core/src/linting/phrase_set_corrections/mod.rs b/harper-core/src/linting/phrase_set_corrections/mod.rs
index d57841948..a1811fbd5 100644
--- a/harper-core/src/linting/phrase_set_corrections/mod.rs
+++ b/harper-core/src/linting/phrase_set_corrections/mod.rs
@@ -289,6 +289,17 @@ pub fn lint_group() -> LintGroup {
"Use `do` instead of `due` when referring to a resource scarcity.",
"Corrects `make due` to `make do` when followed by `with`."
),
+ "MakeSense" => (
+ &[
+ ("make senses", "make sense"),
+ ("made senses", "made sense"),
+ ("makes senses", "makes sense"),
+ ("making senses", "making sense")
+ ],
+ "Use `sense` instead of `senses`.",
+ "Corrects `make senses` to `make sense`.",
+ LintKind::Usage
+ ),
"MootPoint" => (
&[
("mute point", "moot point"),
diff --git a/harper-core/src/linting/phrase_set_corrections/tests.rs b/harper-core/src/linting/phrase_set_corrections/tests.rs
index 38b756c58..5310600a1 100644
--- a/harper-core/src/linting/phrase_set_corrections/tests.rs
+++ b/harper-core/src/linting/phrase_set_corrections/tests.rs
@@ -782,6 +782,44 @@ fn corrects_making_due_with() {
);
}
+// MakeSense
+
+#[test]
+fn fix_make_senses() {
+ assert_suggestion_result(
+ "some symbols make senses only if you have a certain keyboard",
+ lint_group(),
+ "some symbols make sense only if you have a certain keyboard",
+ );
+}
+
+#[test]
+fn fix_made_senses() {
+ assert_suggestion_result(
+ "Usually on the examples of matlab central I have found all with positive magnitude and made senses to me.",
+ lint_group(),
+ "Usually on the examples of matlab central I have found all with positive magnitude and made sense to me.",
+ );
+}
+
+#[test]
+fn fix_makes_senses() {
+ assert_suggestion_result(
+ "If it makes senses I can open a PR.",
+ lint_group(),
+ "If it makes sense I can open a PR.",
+ );
+}
+
+#[test]
+fn fix_making_senses() {
+ assert_suggestion_result(
+ "I appreciate you mentioned the two use cases, which are making senses for both.",
+ lint_group(),
+ "I appreciate you mentioned the two use cases, which are making sense for both.",
+ );
+}
+
// MootPoint
// -point is mute-