| id | 172 | ||
|---|---|---|---|
| title | Link-style rule and shared links config | ||
| status | ✅ | ||
| model | opus | ||
| depends-on |
|
||
| summary | Add an opt-in link-style rule that flags deviation from a per-kind declared relative/absolute, extension, and inline/reference policy, and finish the shared `links:` parser including the external-skip list that issue #47's rule reuses. |
Give projects one switch for a consistent link style
per file kind. This closes gap G8 from the
link handling audit.
Also land the remaining links: config keys. The
proposed external-link rule (issue #47) then has a
config foundation.
See the audit's corpus census in
docs/research/links/README.md.
It found docs/ is ~50% reference-style while rule
READMEs are ~0%. Relative, absolute, .md, and
extensionless targets are mixed in the same doc set.
G8's decision is a new opt-in rule that reads a shared
links: block. G13's decision reuses that block's
external-skip list.
Plan 171 introduces the block's resolution keys. This
plan adds the style: and external-skip: keys. It
also adds the rule that consumes style:.
- Extend the
links:parser from plan 171 withstyle: {path, extension, form}andexternal-skip: [], deep-merged per kind. - Add opt-in rule
link-style(next free MDS id). Red tests: an absolute target understyle.path: relative; a.mdsuffix underextension: strip; a reference link underform: inline. - Per-kind override path: a
rule-readmekind pinned toform: inlineflags a ref-style link there while adocskind onform: anydoes not. - Document the rule README and link it from the audit doc and the rule catalog.
- Confirm
external-skipparses and is exposed for the future issue #47 rule (no HTTP code here).
-
link-styleis opt-in (off by default) and flags path/extension/form deviations per kind. - Per-kind override changes the verdict for the same link in two kinds.
-
links.external-skipparses and is readable by rule code. - Rule README exists and is in the rule catalog.
- All tests pass:
go test ./.... -
go tool golangci-lint runreports no issues.