Skip to content

Offline, privacy-first grammar checker. Fast, open-source, Rust-powered

feat: chomp at the bit→champ at the bit (#1563)

Andrew Dunbar23054e6b2cd9
diff --git a/harper-core/src/linting/phrase_set_corrections/mod.rs b/harper-core/src/linting/phrase_set_corrections/mod.rs
index 9ad1febf5..066f6601f 100644
--- a/harper-core/src/linting/phrase_set_corrections/mod.rs
+++ b/harper-core/src/linting/phrase_set_corrections/mod.rs
@@ -57,6 +57,16 @@ pub fn lint_group() -> LintGroup {
"Don't confuse the French/German `adieu`, meaning `farewell`, with the English `ado`, meaning `fuss`.",
"Corrects `adieu` to `ado`."
),
+ "ChampAtTheBit" => (
+ &[
+ ("chomp at the bit", "champ at the bit"),
+ ("chomped at the bit", "champed at the bit"),
+ ("chomping at the bit", "champing at the bit"),
+ ("chomps at the bit", "champs at the bit"),
+ ],
+ "The correct idiom is `champ at the bit`.",
+ "Corrects `chomp at the bit` to the idiom `champ at the bit`, which has an equestrian origin referring to the way an anxious horse grinds its teeth against the metal part of the bridle."
+ ),
"ClientOrServerSide" => (
&[
("client's side", "client-side"),
diff --git a/harper-core/src/linting/phrase_set_corrections/tests.rs b/harper-core/src/linting/phrase_set_corrections/tests.rs
index feef88e51..6fa908e2c 100644
--- a/harper-core/src/linting/phrase_set_corrections/tests.rs
+++ b/harper-core/src/linting/phrase_set_corrections/tests.rs
@@ -24,6 +24,43 @@ fn corrects_much_ado() {
);
}
+// ChampAtTheBit
+#[test]
+fn correct_chomp_at_the_bit() {
+ assert_suggestion_result(
+ "so other than rolling back to older drivers i might have to chomp at the bit for a while longer yet",
+ lint_group(),
+ "so other than rolling back to older drivers i might have to champ at the bit for a while longer yet",
+ );
+}
+
+#[test]
+fn correct_chomped_at_the_bit() {
+ assert_suggestion_result(
+ "I chomped at the bit, frustrated by my urge to go faster, while my husband chafed at what I thought was a moderate pace.",
+ lint_group(),
+ "I champed at the bit, frustrated by my urge to go faster, while my husband chafed at what I thought was a moderate pace.",
+ );
+}
+
+#[test]
+fn correct_chomping_at_the_bit() {
+ assert_suggestion_result(
+ "Checking in to see when the Windows install will be ready. I am chomping at the bit!",
+ lint_group(),
+ "Checking in to see when the Windows install will be ready. I am champing at the bit!",
+ );
+}
+
+#[test]
+fn correct_chomps_at_the_bit() {
+ assert_suggestion_result(
+ "nobody chomps at the bit to make sure these are maintained, current, complete, and error free",
+ lint_group(),
+ "nobody champs at the bit to make sure these are maintained, current, complete, and error free",
+ );
+}
+
// ClientOrServerSide
// -client's side-