objectionary / objectionary/lints

`sparse-decoration` motive incorrectly lists `if > @` as acceptable, conflicts with lint and pack rules

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

Nobody has claimed this yet.

bug good-title
Dominant language
Java
Stars
14
Forks
39
Avg merge
22h 54m
Merged PRs (30d)
90

Description

What happens

The motive of sparse-decoration shows this as a correct program:

[] > decorates-app
  if > @
    true
    5
    five

The lint flags it anyway. Running new LtByXsl("misc/sparse-decoration").defects(...) on the example as parsed by EoSyntax (lints de102d68, eo-parser 0.63.0):

defects=1: Sparse decoration is prohibited (line 1)

The motive's other two correct examples ([free] > decorates-with-free-args and the unit test) produce no defect, as documented.

Why it is the motive that is wrong

The lint's own packs say an application decorated through @ is sparse. sparse-application.yaml expects a warning for

[] > test
  if. > @
    a
    42
    88

and sparse-formation-with-if.yaml does the same. The XSL checks exactly that: an abstract object with a single child named φ that isn't void and has no ^ reference (misc/sparse-decoration.xsl). Nothing in it looks at whether @ is applied to arguments. So the example in motives/misc/sparse-decoration.md teaches the opposite of what the rule enforces, and a user who reads the motive after getting the warning finds their code listed as correct.

How to fix

Replace the first correct example in sparse-decoration.md with a program that really isn't sparse, for example one with a second attribute or a void parameter, like the existing [free] > decorates-with-free-args. Optionally, add a sentence that decorating through an application with arguments is still sparse, matching sparse-application.yaml.

Contributor guide

No contributing guide indexed for this repository

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.

Research direction

Read motives/misc/sparse-decoration.md and compare its first correct example with misc/sparse-decoration.xsl, sparse-application.yaml, and sparse-formation-with-if.yaml. Replace the misleading example with one that is not sparse, and optionally clarify that application decoration with arguments remains sparse; done means the motive no longer contradicts the lint rule.

Written by the indexing model from the issue text.

Assessment

Tech stack
markdown, xml, yaml
Domain
documentation
Issue type
Documentation
Difficulty
1/5
Estimated time
Under an hour
Activity status
Active
Clarity
Clearly specified
Newbie friendliness
90/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.