objectionary / objectionary/lints
`excludesLints` in `WithoutLintsTest.java` passes even when nothing is excluded
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 14
- Forks
- 39
- Avg merge
- 22h 54m
- Merged PRs (30d)
- 90
Description
The parameterized test excludesLints in src/test/java/org/eolang/lints/WithoutLintsTest.java:34 builds a WithoutLints over a single fake lint named ascii-only (line 41) and asks it to exclude unit-test-missing or unit-test-without-live-file (line 42). Neither name is in the list, so the assertion at line 44 only checks that ascii-only is not equal to the excluded name. That holds whatever WithoutLints does: if its filter handed the origin back untouched, the test would still be green.
The fixture drifted over several refactors, the last one in 235cda2d swapping in LtFake("ascii-only"), while the names in @ValueSource stayed the same.
Putting new WithoutLintsTest.LtFake(lid) into the fixture next to another fake, and asserting that lid is not among the remaining names, makes the test fail when exclusion stops working.
@yegor256
Contributor guide
No contributing guide indexed for this repository
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.
Research direction
Start with the parameterized excludesLints test in src/test/java/org/eolang/lints/WithoutLintsTest.java, especially lines 34-44 and the LtFake fixture. Run this test before and after strengthening the fixture with another fake lint, then verify the assertion fails if an excluded lint remains and passes when exclusion works.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- testing
- Issue type
- Bug
- Difficulty
- 1/5
- Estimated time
- Under an hour
- Activity status
- Active
- Clarity
- Clearly specified
- Newbie friendliness
- 88/100