Repository navigation
Open
Description
Several constructs are accepted today even though they're probably mistakes. For each, the spec has to say whether a conforming linter rejects it, warns, or accepts it, and whether tightening counts as a breaking change (#12).
Related: openlint/openlint#16 (error messages for edge cases).
Open questions in the draft:
- The ruleset document (draft line 299):
documentationUrltakes only an absolutehttp,https, orftpURL with a public host, which is how theurlformat of OpenLint's validator reads a URL. The schema spells that out as a pattern. It rejectsmailto:andurn:URIs,localhost, single-label intranet hosts such ashttp://wiki/docs, private and loopback addresses, and punycode host names; see /conf/ruleset/documentation-url-intranet. Accepting any absolute URI [[RFC3986]] would let a ruleset link to internal documentation. - extends (draft line 328): Elements after the mode are accepted and ignored, so
[./base.yaml, all, extra]reads as[./base.yaml, all]. OpenLint accepts them although its own validation schema forbids them for this array. Rejecting them would catch a misplaced bracket. - Shorthands (draft line 374): A numeric shorthand such as
r: 0is rejected only by OpenLint's validation schema. Its type definitions and its merge code accept a number and would apply it as the severity. Accepting numbers in shorthands would remove the difference withseveritywithout making any ruleset invalid. - then (draft line 546):
then: []is accepted, and the rule then asserts nothing and never reports a result. Rejecting an empty array would catch a rule left unfinished. - then (draft line 556): An unknown property inside an invocation, such as
functionOptionwithout the s, is ignored. When the function has no required option it runs with its defaults; when it has one, the ruleset is rejected for the missingfunctionOptionswith a message that does not point at the misspelling. Rejecting the unknown property would catch the misspelling in both cases.
Part of the work to resolve the draft's open questions (discussion #13). AI use: Claude grouped the draft's inline issues and drafted this issue at Kin's request; the questions are quoted from the spec.
Metadata
Metadata
Assignees
Labels
No labels
Activity