Skip to content

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

feat: fan fare/fan-fare → fanfare (#4766)

Andrew Dunbar2a98627f681b
diff --git a/harper-core/default_config.json b/harper-core/default_config.json
index 31e70d1e3..2354e6a4f 100644
--- a/harper-core/default_config.json
+++ b/harper-core/default_config.json
@@ -495,6 +495,13 @@
"label": "Everywhere"
}
},
+ {
+ "Bool": {
+ "name": "Fanfare",
+ "state": true,
+ "label": "Fanfare"
+ }
+ },
{
"Bool": {
"name": "Furthermore",
diff --git a/harper-core/src/linting/closed_compounds.rs b/harper-core/src/linting/closed_compounds.rs
index 367a902dd..6330b6c37 100644
--- a/harper-core/src/linting/closed_compounds.rs
+++ b/harper-core/src/linting/closed_compounds.rs
@@ -35,6 +35,7 @@ pub fn lint_group() -> LintGroup {
"Everybody" => (&["every body"][..], "everybody"),
"Everyone" => (&["every one"][..], "everyone"),
"Everywhere" => (&["every where"][..], "everywhere"),
+ "Fanfare" => (&["fan fare", "fan-fare"][..], "fanfare"),
"Furthermore" => (&["further more"][..], "furthermore"),
"Guesswork" => (&["guess work"][..], "guesswork"),
"Henceforth" => (&["hence forth"][..], "henceforth"),
@@ -418,4 +419,22 @@ mod tests {
"the rust compiler is fast, but oftentimes it has to perform a lot of unnecessary checks because crates contain more stuff than needed",
);
}
+
+ #[test]
+ fn fan_space_fare() {
+ assert_suggestion_result(
+ "There was much fan fare over all the technology Bill Gates put into his house.",
+ lint_group(),
+ "There was much fanfare over all the technology Bill Gates put into his house.",
+ );
+ }
+
+ #[test]
+ fn fan_hyphen_fare() {
+ assert_suggestion_result(
+ "Indeed, most users will experience major version updates with absolutely zero fan-fare.",
+ lint_group(),
+ "Indeed, most users will experience major version updates with absolutely zero fanfare.",
+ );
+ }
}