Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

False positive on imperative mood check due to adverb #393

Open
ejpcmac opened this issue Sep 8, 2024 · 2 comments
Open

False positive on imperative mood check due to adverb #393

ejpcmac opened this issue Sep 8, 2024 · 2 comments

Comments

@ejpcmac
Copy link

ejpcmac commented Sep 8, 2024

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
Copy link
Author

ejpcmac commented Sep 8, 2024

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
Copy link
Collaborator

epage commented Sep 18, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants