Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

unsorted-named-attributes skips nested formation-valued attributes

Open Beginner friendly
#1,556 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 3 days

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
68/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
xml
Domain
devtools

Research direction

Start with the stylesheet /org/eolang/lints/names/unsorted-named-attributes.xsl, where the main selection and the preceding-sibling selection both filter on @base != '∅'. Parse the reproduction snippet with eo-parser 0.63.0 to see that nested formation nodes carry @name but no @base. Then add positive and negative EO fixtures with formation-valued attributes, and check that a at line 4 is reported while the phi, void and test exceptions still hold.

Written by the indexing model from the issue text.

Description

unsorted-named-attributes skips named attributes whose values are formations. Consequently it accepts a formation with its nested attributes in reverse alphabetical order, although the rule requires named attributes to be sorted.

Steps to reproduce

Parse this source with the pinned eo-parser version 0.63.0 and apply /org/eolang/lints/names/unsorted-named-attributes.xsl:

[x] > app
  [y] > z
    y.plus x > @
  [y] > a
    y.plus x > @

Actual result

The stylesheet returns an empty <defects/>. Both z and a are regular named attributes of app, but a appears after z.

Expected result

Report the out-of-order a attribute at line 4, just as the rule reports an out-of-order attribute whose value is an application. Sorting should include nested formations and keep the documented exceptions for phi, void attributes and tests.

Reproduced against commit 0edb00fcc69bd9131e86c84e2f72279ab2f2e7b6. In the parser's XMIR, the two nested formation nodes have @name but no @base. Both the main selection and the preceding-sibling selection in this stylesheet use @base != '∅'. In XPath this comparison is false when @base is absent, so formations are filtered out along with void attributes. This also prevents a formation from participating in the comparison with surrounding application attributes.

#1001 introduced the sorting rule and #1013 implemented it; this is a missing case in that implementation. The current positive and negative EO fixtures use application-valued attributes only.

Dominant language
Java
Stars
14
Forks
39
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

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from objectionary/lints

All issues in objectionary/lints

Similar issues

More Java issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.