Skip to content

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

feat: a little of practice → a little / a bit of (#3839)

Andrew Dunbarbdf8a887330b
diff --git a/harper-core/default_config.json b/harper-core/default_config.json
index 632a7929d..9aa25d36f 100644
--- a/harper-core/default_config.json
+++ b/harper-core/default_config.json
@@ -5375,6 +5375,13 @@
"state": true,
"label": "For The Nth Time"
}
+ },
+ {
+ "Bool": {
+ "name": "ALittleOfPractice",
+ "state": true,
+ "label": "A Little of Practice"
+ }
}
]
}
diff --git a/harper-core/src/linting/weir_rules/ALittleOfPractice.weir b/harper-core/src/linting/weir_rules/ALittleOfPractice.weir
new file mode 100644
index 000000000..d70481076
--- /dev/null
+++ b/harper-core/src/linting/weir_rules/ALittleOfPractice.weir
@@ -0,0 +1,11 @@
+expr main (a little of practice)
+
+let message "Have you perhaps confused `a little practice` or `a bit of practice`?"
+let description "Corrects `a little of practice` to `a little practice` or `a bit of practice`."
+let kind "Usage"
+let becomes ["a little practice", "a bit of practice"]
+
+test "Developing a theme takes a little of practice. There are multiple templates for each module." "Developing a theme takes a little practice. There are multiple templates for each module."
+test "I think with a little of practice I'll get better at making these." "I think with a bit of practice I'll get better at making these."
+test "But first you need a little of practice, and here we are:" "But first you need a little practice, and here we are:"
+test "Although it requires a little of practice and a learning curve, it totally worthy." "Although it requires a bit of practice and a learning curve, it totally worthy."