Skip to content

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

feat: formidable years→formative years (#3249)

Andrew Dunbar88c6c8531344
diff --git a/harper-core/default_config.json b/harper-core/default_config.json
index 96edb3e1b..c932572a1 100644
--- a/harper-core/default_config.json
+++ b/harper-core/default_config.json
@@ -1274,6 +1274,13 @@
"state": true,
"label": "Inflection Point"
}
+ },
+ {
+ "Bool": {
+ "name": "FormativeYears",
+ "state": true,
+ "label": "Formative Years"
+ }
}
]
}
diff --git a/harper-core/src/linting/weir_rules/FormativeYears.weir b/harper-core/src/linting/weir_rules/FormativeYears.weir
new file mode 100644
index 000000000..dea62eb23
--- /dev/null
+++ b/harper-core/src/linting/weir_rules/FormativeYears.weir
@@ -0,0 +1,9 @@
+expr main (formidable years)
+
+let message "Did you mean `formative years`? Use `formative` to describe a period of growth or influence. `Formidable` is typically used for something intimidating."
+let description "Flags the misuse of `formidable years` when `formative years` is likely intended. This rule distinguishes between the shaping of character (`formative`) and the inspiring of fear or awe (`formidable`)."
+let kind "Malapropism"
+let becomes "formative years"
+
+test "Here's how I would approach it, a little earlier than my formidable years there was music I was \“Forced\” to listen to." "Here's how I would approach it, a little earlier than my formative years there was music I was \“Forced\” to listen to."
+test "The 60's were full of turmoil as a country but my most formidable years as a person." "The 60's were full of turmoil as a country but my most formative years as a person."