committed
committed copied to clipboard
False-positive: imperative verb `default`
Firstly, loving Committed 🚀
I noticed that when Committed is set to check for the imperative mood, there is one edge case which it doesn't pick up correctly due to homographic noun and verbs: default.
For example:
-
Noun:
fix: default is 42 -
Verb
fix: default to 42
A simple heuristic to determine whether 'default' is the imperative verb or the noun would be to check for the next word. If it is followed by 'to', then it is most likely the imperative. Other cases are more likely to be the noun.
This won't cover all cases; for example "default all integers to 42" still uses the imperative form, but I don't know how Committed detects the imperative in general.