mirror of
https://github.com/Automattic/harper.git
synced 2025-12-23 08:48:15 +00:00
feat: make senses→make sense (#2330)
This commit is contained in:
parent
c9f4b7c49c
commit
433829f3b8
2 changed files with 49 additions and 0 deletions
|
|
@ -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"),
|
||||
|
|
|
|||
|
|
@ -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-
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue