`Source.without()` doesn't flag non-existing lint names, causing silent failures
Maintainers usually reply within 2 days
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 72/100
Research direction
Read src/main/java/org/eolang/lints/Source.java and WithoutLints.java, then trace how LtIncorrectUnlint obtains the set of valid lint names. Check how Source.without() handles names that are not in that set. Done means unknown names cause an IllegalArgumentException that names them, while valid names continue to filter lints.
Written by the indexing model from the issue text.
Description
Source.without() in src/main/java/org/eolang/lints/Source.java:83 hands its names to MonoWithout, and WithoutLints (WithoutLints.java:39) only filters out the lints whose name is in the list. A name that matches no lint is dropped without a word, so a typo such as unit-test-misssing keeps the lint switched on, and the caller cannot tell why.
Inside a source the same mistake is caught: +unlint abracadabra is reported by incorrect-unlint, because LtIncorrectUnlint checks the name against the set of every lint name. The Java entry point has no such check, and there is no public way to get that set from outside the package, since MonoLintNames is package-private. This is what leaves objectionary/eo#9332 open: eo-maven-plugin passes skipSourceLints from the pom.xml straight to without() and logs "Unlinting source lints" even for names that do not exist.
without() could throw an IllegalArgumentException naming every unknown name it was given, using the same set of names that LtIncorrectUnlint already reads.
@yegor256 please take a look
- Dominant language
- Java
- Stars
- 14
- Forks
- 38
- Avg merge
- 3d 18h
- Merged PRs (30d)
- 37
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
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
objectionary/lints#1559 ·
Maintainers usually reply within 2 days
-
bug good-title
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
objectionary/lints#1556 ·
Maintainers usually reply within 2 days
-
bug good-title
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
objectionary/lints#1555 ·
Maintainers usually reply within 2 days
-
`incorrect-package` motive's documentation conflicts with the lint's actual rule applicationPossibly taken @gemshrine claimed this 2 days ago. Openbug good-title
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
objectionary/lints#1544 ·
Maintainers usually reply within 2 days
-
Inconsistency between `incorrect-test-object-name` documentation and actual lint behaviorPossibly taken @gemshrine claimed this 2 days ago. Openbug good-title
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
objectionary/lints#1543 ·
Maintainers usually reply within 2 days
All issues in objectionary/lints
Similar issues
-
:maddi-inspection-kotlin:test runs out of heap in a full maddi test run; exit 1 with no failing testOpenbuild/ci front-end:kotlin
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
uwolfer/gerrit-intellij-plugin#768 ·
Maintainers usually reply within 1 day
-
github_actions
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
hiero-ledger/hiero-consensus-node#27621 ·
Maintainers usually reply within 1 day
-
x:knowledge/elementary x:module/practice-exercise
Difficulty 2/5 1-3 hours Newbie friendliness 65/100