mirror of
https://github.com/Automattic/harper.git
synced 2025-12-23 08:48:15 +00:00
feat:rule of thumbs→rules of thumb/flip the bill→foot the bill (#1957)
Some checks are pending
Build Binaries / Release harper-cli - macOS-x86_64 (push) Waiting to run
Build Binaries / Release harper-cli - macOS-aarch64 (push) Waiting to run
Build Binaries / Release harper-cli - Linux-aarch64-GNU (push) Waiting to run
Build Binaries / Release harper-cli - Linux-aarch64-musl (push) Waiting to run
Build Binaries / Release harper-cli - Linux-x86_64-musl (push) Waiting to run
Build Binaries / Release harper-cli - Windows-x86_64 (push) Waiting to run
Build Binaries / Release harper-ls - macOS-aarch64 (push) Waiting to run
Build Binaries / Release harper-ls - Linux-aarch64-GNU (push) Waiting to run
Build Binaries / Release harper-ls - Linux-aarch64-musl (push) Waiting to run
Build Chrome Plugin / package (push) Waiting to run
Build Binaries / Release harper-cli - Linux-x86_64-GNU (push) Waiting to run
Build Binaries / Release harper-ls - macOS-x86_64 (push) Waiting to run
Build Binaries / Release harper-ls - Linux-x86_64-GNU (push) Waiting to run
Build Binaries / Release harper-ls - Linux-x86_64-musl (push) Waiting to run
Build Binaries / Release harper-ls - Windows-x86_64 (push) Waiting to run
Build Web / build (push) Waiting to run
Package VS Code Plugin / Package - darwin-arm64 (push) Waiting to run
Package VS Code Plugin / Package - darwin-x64 (push) Waiting to run
Package VS Code Plugin / Package - linux-arm64 (push) Waiting to run
Package VS Code Plugin / Package - linux-x64 (push) Waiting to run
Package VS Code Plugin / Package - win32-x64 (push) Waiting to run
Package WordPress Plugin / package (push) Waiting to run
Precommit / precommit (push) Waiting to run
Some checks are pending
Build Binaries / Release harper-cli - macOS-x86_64 (push) Waiting to run
Build Binaries / Release harper-cli - macOS-aarch64 (push) Waiting to run
Build Binaries / Release harper-cli - Linux-aarch64-GNU (push) Waiting to run
Build Binaries / Release harper-cli - Linux-aarch64-musl (push) Waiting to run
Build Binaries / Release harper-cli - Linux-x86_64-musl (push) Waiting to run
Build Binaries / Release harper-cli - Windows-x86_64 (push) Waiting to run
Build Binaries / Release harper-ls - macOS-aarch64 (push) Waiting to run
Build Binaries / Release harper-ls - Linux-aarch64-GNU (push) Waiting to run
Build Binaries / Release harper-ls - Linux-aarch64-musl (push) Waiting to run
Build Chrome Plugin / package (push) Waiting to run
Build Binaries / Release harper-cli - Linux-x86_64-GNU (push) Waiting to run
Build Binaries / Release harper-ls - macOS-x86_64 (push) Waiting to run
Build Binaries / Release harper-ls - Linux-x86_64-GNU (push) Waiting to run
Build Binaries / Release harper-ls - Linux-x86_64-musl (push) Waiting to run
Build Binaries / Release harper-ls - Windows-x86_64 (push) Waiting to run
Build Web / build (push) Waiting to run
Package VS Code Plugin / Package - darwin-arm64 (push) Waiting to run
Package VS Code Plugin / Package - darwin-x64 (push) Waiting to run
Package VS Code Plugin / Package - linux-arm64 (push) Waiting to run
Package VS Code Plugin / Package - linux-x64 (push) Waiting to run
Package VS Code Plugin / Package - win32-x64 (push) Waiting to run
Package WordPress Plugin / package (push) Waiting to run
Precommit / precommit (push) Waiting to run
This commit is contained in:
parent
5bba33a26e
commit
e25c93046e
4 changed files with 76 additions and 1 deletions
|
|
@ -924,6 +924,13 @@ pub fn lint_group() -> LintGroup {
|
|||
"Detects when `roadmap` is used instead of `road map`, prompting the correct spacing.",
|
||||
LintKind::WordChoice
|
||||
),
|
||||
"RulesOfThumb" => (
|
||||
["rule of thumbs", "rule-of-thumbs"],
|
||||
["rules of thumb"],
|
||||
"The correct plural is `rules of thumb`.",
|
||||
"Corrects pluralizing the wrong noun in `rule of thumb`.",
|
||||
LintKind::Usage
|
||||
),
|
||||
"SameAs" => (
|
||||
["same then"],
|
||||
["same as"],
|
||||
|
|
|
|||
|
|
@ -1142,6 +1142,26 @@ fn correct_iirc_correctly() {
|
|||
// RoadMap
|
||||
// -none-
|
||||
|
||||
// RulesOfThumb
|
||||
|
||||
#[test]
|
||||
fn correct_rules_of_thumbs() {
|
||||
assert_suggestion_result(
|
||||
"Thanks. 0.2 is just from my rule of thumbs.",
|
||||
lint_group(),
|
||||
"Thanks. 0.2 is just from my rules of thumb.",
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn correct_rules_of_thumbs_hyphenated() {
|
||||
assert_suggestion_result(
|
||||
"Add rule-of-thumbs for basic metrics, like \"Spill more than 1GB is a red flag\".",
|
||||
lint_group(),
|
||||
"Add rules of thumb for basic metrics, like \"Spill more than 1GB is a red flag\".",
|
||||
);
|
||||
}
|
||||
|
||||
// SameAs
|
||||
// -none-
|
||||
|
||||
|
|
|
|||
|
|
@ -194,6 +194,17 @@ pub fn lint_group() -> LintGroup {
|
|||
// ConfusedPair??
|
||||
LintKind::WordChoice
|
||||
),
|
||||
"FootTheBill" => (
|
||||
&[
|
||||
("flip the bill", "foot the bill"),
|
||||
("flipped the bill", "footed the bill"),
|
||||
("flipping the bill", "footing the bill"),
|
||||
("flips the bill", "foots the bill"),
|
||||
],
|
||||
"The standard expression is `foot the bill`.",
|
||||
"Corrects `flip the bill` to `foot the bill`.",
|
||||
LintKind::Nonstandard
|
||||
),
|
||||
"HavePassed" => (
|
||||
&[
|
||||
("had past", "had passed"),
|
||||
|
|
|
|||
|
|
@ -334,7 +334,6 @@ fn dont_flag_dont_dose_it_too_high() {
|
|||
);
|
||||
}
|
||||
|
||||
// the only solution the other hopefully-dominant-reasonable-adult-human mind can find, is to dose it off, hoping the drowsiness can keep the fear at bay
|
||||
#[test]
|
||||
#[ignore = "would be a false positive in a naive implementation"]
|
||||
fn dont_flag_to_dose_it_off() {
|
||||
|
|
@ -552,6 +551,44 @@ fn correct_to_an_extend() {
|
|||
);
|
||||
}
|
||||
|
||||
// FootTheBill
|
||||
|
||||
#[test]
|
||||
fn correct_flip_the_bill() {
|
||||
assert_suggestion_result(
|
||||
"- SQL Compare (If the company will flip the bill)",
|
||||
lint_group(),
|
||||
"- SQL Compare (If the company will foot the bill)",
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn correct_flipped_the_bill() {
|
||||
assert_suggestion_result(
|
||||
"As a meetup we were extremely lucky that NOVI flipped the bill for our in-person events.",
|
||||
lint_group(),
|
||||
"As a meetup we were extremely lucky that NOVI footed the bill for our in-person events.",
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn correct_flipping_the_bill() {
|
||||
assert_suggestion_result(
|
||||
"for the simple reason that there were no multimillion dollar company flipping the bill",
|
||||
lint_group(),
|
||||
"for the simple reason that there were no multimillion dollar company footing the bill",
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn correct_flips_the_bill() {
|
||||
assert_suggestion_result(
|
||||
"There seems to be a perennial debate in Illinois between urbanites and rural folk about who really flips the bill.",
|
||||
lint_group(),
|
||||
"There seems to be a perennial debate in Illinois between urbanites and rural folk about who really foots the bill.",
|
||||
);
|
||||
}
|
||||
|
||||
// HavePassed
|
||||
|
||||
#[test]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue