crate-ci / committed

Nitpicking commit history since beabf39
Apache License 2.0
103 stars 7 forks source link

False positive on imperative mood check due to adverb #393

Open ejpcmac opened 2 months ago

ejpcmac commented 2 months ago

Problem description

In committed 1.0.20, using the following configuration:

style = "conventional"
subject_capitalized = false
allowed_types = ["feat"]

Let the following message:

feat: always use a given behaviour

committed reports the following error:

error Subject should be in the imperative mood but found `always`

Expected behaviour

“Always use a given behaviour.” is actually in imperative mood, but the verb is in second position, after an adverb. This should not report an error.

ejpcmac commented 2 months ago

While looking at the implementation, it seems that “always” is blacklisted in the imperative crate.

Is there any rationale behind this? As “always” is a frequency adverb, the word following it should be a verb. Shouldn’t we check for an verb in its imperative form as the second word when the first word is an adverb?

epage commented 1 month ago

That entry was taken from https://github.com/PyCQA/pydocstyle

I don't know if I'm in a good place to arbitrate decisions on this.