objectionary / objectionary/lints
prohibit inner inner objects with `@base` attributes if it can be merged with its parent
@h1alexbel is already working on this.
Since Apr 2, 2025.
- Dominant language
- Java
- Stars
- 14
- Forks
- 39
- Avg merge
- 22h 54m
- Merged PRs (30d)
- 90
Description
In EO 0.51.0 we introduced roll-bases.xsl that reduced amount of nested objects and merges their @base attributes if it's possible.
Let's make a lint that checks if all possible bases are merged.
Imagine we have two objects:
<o base="X">
<o base="Y"/>
</o>
If they are merged we get <o base="YX"/>.
We can't merge them if:
Xdoes not start with.(dot)Xstarts with.andYstarts with.Yhas inner objectZthat can't be merged withY(apply all the rules forY-Zpair)
<o base="X">
<o base="Y">
<o base="Z"/>
</o>
</o>
Yhas more than 1 any inner objectsYhas data (not emptytext())Yis an abstract object
For more details see the roll-bases.xsl itself
Here X and Y are just variables in common sense, not a specific bases. It can be .seq, $.seq or Q.org.eolang.seq or something similar under the X and Y.
The severity level is warning (temporary)
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.
Assessment
This issue has not been assessed yet.