unsorted-named-attributes skips nested formation-valued attributes
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
- 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.
More from objectionary/lints
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
objectionary/lints#1555 ·
Maintainers usually reply within 3 days
-
`Source.without()` doesn't flag non-existing lint names, causing silent failuresPossibly taken @Thayorns claimed this 1 day ago. Openbug good-title
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
objectionary/lints#1545 ·
Maintainers usually reply within 3 days
-
`incorrect-package` motive's documentation conflicts with the lint's actual rule applicationPossibly taken @gemshrine claimed this 2 days ago. Openbug good-title
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
objectionary/lints#1544 ·
Maintainers usually reply within 3 days
-
Inconsistency between `incorrect-test-object-name` documentation and actual lint behaviorPossibly taken @gemshrine claimed this 2 days ago. Openbug good-title
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
objectionary/lints#1543 ·
Maintainers usually reply within 3 days
-
`Defect.Default` equality does not account for `experimental` flagPossibly taken A pull request linked to this issue is open or already merged. Openbug good-title
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
objectionary/lints#1540 ·
Maintainers usually reply within 3 days
All issues in objectionary/lints
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
NationalSecurityAgency/ghidra#9884 ·
Maintainers usually reply within 2 days
-
Status: Pending Review Type: Feature Request
Difficulty 1/5 Under an hour Newbie friendliness 82/100
OpenRefine/OpenRefine#8019 ·
Maintainers usually reply within 1 day
-
`timer` rule rejects dates the engine acceptsPossibly taken @MFA-G claimed this today. Openbug ready
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
camunda/bpmnlint-plugin-camunda-compat#281 · 3 comments ·
Maintainers usually reply within 1 day
-
status: waiting-for-triage
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 62/100