You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
How rules inherited through extends, rules redefined in a ruleset, and rules in overrides combine isn't fully settled. The current behaviour has surprises worth deciding on deliberately.
Related: alias behaviour in redefinitions and overrides is tracked in #2 Aliases.
Open questions in the draft:
Applying overrides (draft line 839): An override with extends and no rules drops, for the documents it matches, every rule the ruleset inherits through its own extends, while its own rules stay. With rules, it adds to them. Adding in both cases would make the two forms consistent.
Applying overrides (draft line 863): These three checks run only when the override applies to a document, as they do in OpenLint. Whether a Rule Object in an override's rules merges with the rule it redefines, as /req/rules/redefinition-merge says for extends, or replaces it, is not tested. A ruleset with such an error loads without error until the first document the override matches. Everything else in an override is checked when the ruleset loads. Checking these three at load time too would report the error before any document matches.
Rule state: enabled and severity (draft line 918): A redefinition keeps every property it does not set, so the base's message or severity survives a redefinition that changes given and then, and can stop matching what the rule now checks. Replacing the whole rule would make a redefinition independent of the rule it replaces.
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.
Activity