`unit-test-is-not-verb` incorrectly rejects valid verb test names in `Vocabulary.isVerb`
Maintainers usually reply within 1 day
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 76/100
Research direction
Start in src/main/java/org/eolang/lints/Vocabulary.java at line 95 and inspect how Vocabulary.isVerb interprets the word after “It can”. Review the skipped lint puzzle in eo-runtime/pom.xml for the affected examples. Done means valid verb-only names such as can-format-the-error-message-of-negative-places pass, while names like can-and-two-negatives and can-upper-case-text remain rejected.
Written by the indexing model from the issue text.
Description
Vocabulary.isVerb in src/main/java/org/eolang/lints/Vocabulary.java:95 tags "It" followed by the words of a test name, and after a modal it accepts the name only when the next tag is exactly VB. The perceptron model does not always give that tag to a word that can only be a verb in that position, so unit-test-is-not-verb rejects names like can-format-the-error-message-of-negative-places, can-print-a-single-character, can-scan-a-complex-integer, can-floor-a-negative-fraction or can-round-to-the-last-place.
After It can, English allows nothing but a verb, so the test name is right and the tag is wrong. eo-runtime/pom.xml in objectionary/eo keeps the lint skipped for this reason, with a puzzle naming format, print, scan and floor among the words it trips on. Renaming those tests to synonyms the model happens to like would not make them read better.
After a modal, an NN or NNS tag on the next word could be taken as a verb too, while CC, IN, DT and JJ stay rejected, so names with no verb at all, like can-and-two-negatives or can-upper-case-text, are still caught.
@yegor256
- Dominant language
- Java
- Stars
- 14
- Forks
- 40
- Avg merge
- 3d 12h
- Merged PRs (30d)
- 67
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from objectionary/lints
-
LtByXsl throws NoSuchElementException when defect element has no text contentPossibly taken @opusstudiohq-max claimed this 3 days ago. Openbug
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
objectionary/lints#1640 · 1 comment ·
Maintainers usually reply within 1 day
-
No public way to list the names of the lints, so a caller cannot tell a typo from a real namePossibly taken @yegor256 claimed this today. Openenhancement
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
objectionary/lints#1614 · 1 comment · 1 assignee ·
Maintainers usually reply within 1 day
-
Incorrect alphabetical ordering of `+alias` metas due to short name sorting by parserPossibly taken @opusstudiohq-max claimed this 13 days ago. Openbug good-title
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
objectionary/lints#1581 · 1 comment ·
Maintainers usually reply within 1 day
-
OpenAI key exposed to third-party action during the titles workflow of issue openingMay be free again @yegor256 claimed this 39 days ago, and no pull request is open. Openenhancement good-title
Difficulty 2/5 1-3 hours Newbie friendliness 64/100
objectionary/lints#1495 · 1 comment · 1 assignee ·
Maintainers usually reply within 1 day
-
CI workflows not pinned to immutable release tags or commit SHAs causing irreproducible CI failuresPossibly taken @gemshrine claimed this 37 days ago. Openenhancement good-title
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
objectionary/lints#1480 · 1 comment ·
Maintainers usually reply within 1 day
All issues in objectionary/lints
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 73/100
Julow/Unexpected-Keyboard#1490 ·
Maintainers usually reply within 4 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 67/100
Vakore/ZappierGames#275 ·
-
bug key bindings source editor
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
Visual COBOL: missing 11.0 and 12.0, and 9.0 date differs from Rocket Software's lifecycle pageOpen
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
endoflife-date/endoflife.date#11561 ·
Maintainers usually reply within 1 day