ShaddyDC / committable

Linter for commit messages with minimal setup
Apache License 2.0
0 stars 0 forks source link

Enforce imperative #2

Open ShaddyDC opened 4 months ago

ShaddyDC commented 4 months ago

Some thoughts are here.

A very simple heuristic might be to check that the first word doesn't end in a single s, -ing, or -ed. I'll have to research more and see how well these work.

ShaddyDC commented 2 months ago

That heuristic doesn't work. Some counter examples in imperative.

Verbs ending in "ed":

Verbs ending in "s":

ShaddyDC commented 2 months ago

I also don't really want to include some ML model or something, so I don't think there's a simple solution. My best idea would be to combine the above heuristic with a list of exceptions, but at that point, I'd almost rather turn that into a separate crate, even if it's a bit narrow in scope.