From 433829f3b8e2835da26ee23cd671396b123c30f3 Mon Sep 17 00:00:00 2001 From: Andrew Dunbar Date: Wed, 17 Dec 2025 00:21:53 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20make=20senses=E2=86=92make=20sense=20(#?= =?UTF-8?q?2330)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/linting/phrase_set_corrections/mod.rs | 11 ++++++ .../linting/phrase_set_corrections/tests.rs | 38 +++++++++++++++++++ 2 files changed, 49 insertions(+) diff --git a/harper-core/src/linting/phrase_set_corrections/mod.rs b/harper-core/src/linting/phrase_set_corrections/mod.rs index d5784194..a1811fbd 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 38b756c5..5310600a 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-