Skip to content

Fix three contradictions and move normative text into requirements - #17

Open
kinlane wants to merge 1 commit into
mainfrom
spec-draft-review-fixes
Open

kinlane wants to merge 1 commit into
mainfrom
spec-draft-review-fixes

Conversation

@kinlane

@kinlane kinlane commented Oct 29, 2026

Copy link
Copy Markdown
Member

Findings from a read-through of the working draft. Every change is checked against OpenLint 1.0.0: tools/build.py --check passes, and 238 of 238 tests pass. The only failing test is the existing proposed-requirement test /conf/ruleset/document-two-yaml-documents, which isn't counted.

Contradictions

  • /req/rules/recommended vs the extends modes. As written, it applied to every ruleset in the chain and allowed only a shorthand to enable a recommended: false rule. That contradicted /req/extends/mode-all (and /conf/extends/mode-all), /req/extends/mode-off and /req/shorthands/false. It now applies to the ruleset being linted and defers to the mode requirements for inherited rules.
  • /req/result/range vs the worked example. The requirement said start is the value's first character, but the example (and OpenLint) put a block mapping's start just after get:. The requirement now says so. The new /conf/result/range-nested pins both a mapping and a scalar, start and end.
  • ECMA-402 reference. It linked to 262.ecma-international.org, a different standard (ECMA-262). It now points to https://402.ecma-international.org/12.0/, which matches the cited title.

Normative behaviour that was only in informative text

  • /req/overrides/scope now says globs match as minimatch 3.1.5 does.
  • /req/functions/pattern now allows both the bare form and the /…/flags form.
  • New /req/extends/extra-elements: elements after the mode are ignored. /conf/extends/mode-all-extra-element was filed against mode-all, whose text didn't say this. It now points at the new requirement.

Tests

  • New /conf/message/placeholder-value. {{error}} is still untested. Core function messages aren't specified, so a linter-core test can't pin the text, and a custom-function test would put a requirement from two classes in one test. A call on how to test it is welcome.

Open to rewording any of it. These are suggestions for the draft, not decisions.

🤖 Generated with Claude Code

- /req/rules/recommended applies to the ruleset being linted; inherited
  rules follow their extends mode, so it no longer contradicts mode-all,
  mode-off and shorthands.
- /req/result/range says where a block mapping or sequence value starts
  (just after its key's colon), matching the worked example and OpenLint.
- ECMA-402 links to ECMA-402 12.0, not the ECMA-262 site.
- The minimatch glob dialect, the /regex/flags form of pattern, and
  ignoring extends elements after the mode are now in requirements
  (new /req/extends/extra-elements).
- New tests: /conf/result/range-nested, /conf/message/placeholder-value.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@kinlane
kinlane requested a review from joostfarla October 29, 2026 12:28

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant