feat: make senses→make sense (#2330)

This commit is contained in:
Andrew Dunbar 2025-12-17 00:21:53 +08:00 committed by GitHub
parent c9f4b7c49c
commit 433829f3b8
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 49 additions and 0 deletions

View file

@ -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"),

View file

@ -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-