objectionary / objectionary/lints
`atom-in-atom` lint lacks corresponding pack and misses testing
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 14
- Forks
- 39
- Avg merge
- 22h 54m
- Merged PRs (30d)
- 90
Description
LtByXslTest.catchesLostXsls checks that every YAML pack has an XSL beside it.
Nothing checks the other direction, and one lint has no pack at all.
What happens.
lints: 81 XSL files under src/main/resources/org/eolang/lints
packs: 80 directories under src/test/resources/org/eolang/lints/packs/single
missing: atom-in-atom
There is no atom-in-atom directory and no YAML anywhere that names it, so the
rule is never run by the test suite.
The rule itself works. Handing it a document with an atom inside an atom:
<object author='tests'>
<o name='outer' line='1'>
<o name='λ' atom='Φ.bytes'/>
<o name='inner' line='2'>
<o name='λ' atom='Φ.bytes'/>
</o>
</o>
</object>
gives
<defects>
<defect line="1" severity="error">Atom "outer" may not have any attributes,
even if they are atoms, which however exist: "inner"</defect>
</defects>
Worth knowing while writing the pack: that shape cannot come from EO source. The
parser refuses both ways of writing it,
[] > outer /Q.bytes
[] > inner /Q.bytes
with Atom cannot contain inner objects; only '+>' and '->' test attributes are allowed in an atom body, and
[] > outer /Q.bytes
[] +> t /Q.bytes
with trailing garbage after name suffix. XMIR reaches the linter from other
tools as well, so the rule still has a job to do.
What should happen. atom-in-atom should have a pack, the way the other eighty
lints do, and the test that guards packs should guard this direction too, so
that a lint added without one is caught.
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 LtByXslTest.catchesLostXsls and inspect the lint files under src/main/resources/org/eolang/lints alongside packs under src/test/resources/org/eolang/lints/packs/single. Add the atom-in-atom pack using the documented XMIR shape, then extend the pack guard to detect lints without packs. Run the relevant test to confirm all 81 lints have corresponding packs.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- testing, tooling
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Active
- Clarity
- Clearly specified
- Newbie friendliness
- 78/100