Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions harper-core/src/linting/phrase_corrections/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -864,7 +864,7 @@ pub fn lint_group() -> LintGroup {
["points of view"],
"The correct plural is `points of view`.",
"Corrects pluralizing the wrong noun in `point of view`.",
LintKind::Usage
LintKind::Grammar
),
"PortAuPrince" => (
// Note: this lint matches any case but cannot correct wrong case
Expand Down Expand Up @@ -943,7 +943,7 @@ pub fn lint_group() -> LintGroup {
["rules of thumb"],
"The correct plural is `rules of thumb`.",
"Corrects pluralizing the wrong noun in `rule of thumb`.",
LintKind::Usage
LintKind::Grammar
),
"SameAs" => (
["same then"],
Expand Down
9 changes: 9 additions & 0 deletions harper-core/src/linting/phrase_set_corrections/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -280,6 +280,15 @@ pub fn lint_group() -> LintGroup {
"Ensures `operating system` is used correctly instead of `operative system`.",
LintKind::Usage
),
"PassersBy" => (
&[
("passerbys", "passersby"),
("passer-bys", "passers-by"),
],
"The correct plural is `passersby` or `passers-by`.",
"Corrects `passerbys` and `passer-bys` to `passersby` or `passers-by`.",
LintKind::Grammar
),
"Piggyback" => (
&[
("piggy bag", "piggyback"),
Expand Down
19 changes: 19 additions & 0 deletions harper-core/src/linting/phrase_set_corrections/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -809,6 +809,25 @@ fn operative_systems() {
);
}

// PassersBy
#[test]
fn correct_passerbys() {
assert_suggestion_result(
"For any passerbys, you may replace visibility: hidden/collapsed with: opacity: 0; pointer-events: none;.",
lint_group(),
"For any passersby, you may replace visibility: hidden/collapsed with: opacity: 0; pointer-events: none;.",
);
}

#[test]
fn correct_passer_bys_hyphen() {
assert_suggestion_result(
"Is there any way for random willing passer-bys to help with this effort?",
lint_group(),
"Is there any way for random willing passers-by to help with this effort?",
);
}

// Piggyback
// -none-

Expand Down
Loading