Skip to content

#1441: Accept can-prefixed positive tests - #1448

Open
zaguzovmaksim0-hue wants to merge 1 commit into
objectionary:masterfrom
zaguzovmaksim0-hue:1441
Open

zaguzovmaksim0-hue wants to merge 1 commit into
objectionary:masterfrom
zaguzovmaksim0-hue:1441

Conversation

@zaguzovmaksim0-hue

Copy link
Copy Markdown
Contributor

Closes #1441.

Aligns unit-test-is-not-verb with the sibling bad-test-name rule. Positive test names beginning with can- are now accepted explicitly; all other positive names continue through the existing OpenNLP VBZ verb check.

This keeps accepts-* and ordinary singular-verb names working as before while removing the contradiction where bad-test-name requires/permits can-* but OpenNLP tags can as a modal (MD) and the Java lint rejects it.

The existing positive-name parameterized test now includes can-read-bytes as a regression case. git diff --check is clean.

The commit was created through GitHub and is cryptographically marked Verified.

Copy link
Copy Markdown
Member

Thanks — this does resolve the collision #1441 describes, and it is the direction the issue proposes. One concern before merging: the can- prefix is now a string literal inside LtTestNotVerb.isVerb, while the set of allowed prefixes is really owned by bad-test-name.xsl (^(can|accepts)-) and by Vocabulary. Two places now have to be kept in step, which is how the two lints drifted apart in the first place. Teaching Vocabulary that a modal followed by a verb is acceptable, or reading the prefix set from one shared place, would keep them from diverging again.

Assigning to @yegor256 to decide which of the two resolutions the issue offers he wants.


Generated by Claude Code

@yegor256
yegor256 self-requested a review September 14, 2026 05:50

This branch has not been deployed

No deployments
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

Successfully merging this pull request may close these issues.

Conflict between unit-test-is-not-verb and bad-test-name lints over can- prefix in positive test names

2 participants