objectionary / objectionary/lints
Dead 'dups' mode template in duplicate-aliases.xsl emitting outdated 'error' element
@yegor256 is already working on this.
Since Aug 21, 2026.
- Dominant language
- Java
- Stars
- 14
- Forks
- 39
- Avg merge
- 22h 54m
- Merged PRs (30d)
- 90
Description
Problem
duplicate-aliases.xsl contains a dead template (mode="dups") that is never invoked, and it emits an outdated <error> element instead of a <defect>.
Details
src/main/resources/org/eolang/lints/aliases/duplicate-aliases.xsl:37-54:
<xsl:template match="meta" mode="dups">
<xsl:for-each select="/object/metas/meta[head='alias']">
...
<error>
...
</error>
</xsl:for-each>
</xsl:template>
Two issues:
-
Dead code. The
mode="dups"template is declared but never invoked — there is no<xsl:apply-templates ... mode="dups">anywhere in the file (confirmed by grep: the only occurrence ofdupsis the template declaration). So this template never runs and produces nothing. -
Outdated element name. Even if it were invoked, it emits
<error>(the old defect format used by eo-parser), while the project's defect contract is<defect>(seeLtByXsl/ the existing packs for this lint, which assert against/defects/defect). The real, active logic of the lint lives in the default template above it, which correctly produces<defect>.
Impact
- Dead code adds confusion: a reader may think the
mode="dups"path is part of the lint's behavior, but it is unreachable. - If someone "fixes" the invocation later, the lint would start emitting
<error>elements that break the/defects/defectcontract and would not be picked up byLtByXsl. - Minor, but it is the kind of leftover that the
errors/empty-objectorcomment-without-dotlints got cleaned up of before.
Expected behaviour
Remove the dead mode="dups" template (and any <error> usage) so the file contains only the working <defect>-based logic. A simple code cleanup with no behavior change.
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.