Expose Markdown validation selection

This commit is contained in:
2026-10-07 23:26:48 +00:00
parent 6397d41517
commit 40068af1bf
20 changed files with 403 additions and 23 deletions

View File

@@ -46,6 +46,26 @@ change under formatting. It never writes formatted bytes back. Omitted or false
disables the check. It runs after tests, selected full vet, and selected package
compilation, before configured product checks.
When `validation.markdown` is an object, ReleaseKit checks local destinations
and supported heading fragments in committed regular Markdown files. Omission
or `null` disables the check; `{}` enables it. Schemed and protocol-relative
links are skipped, URI query components do not affect path checks, and other
existing files or directories receive existence checks only. Missing local
destinations, symlink cycles, and missing Markdown headings fail with the
`markdown-links` identity. Outside-checkout destinations are reported as out
of scope by default. Set
`validation.markdown.enforce_checkout_boundary` to `true` to fail those links;
submodule contents remain out of scope under either setting.
The parser recognizes inline links, images, reference links, and CommonMark
autolinks; link-like text in code is ignored, and raw HTML destinations are
outside this check. Relative paths resolve from the source document in the
captured commit. Query components are ignored for file existence, and percent
escapes in local paths and fragments are decoded once. Fragments are compared
in lowercase with anchors derived from visible ATX or Setext heading text.
Anchors keep Unicode letters and numbers, underscores, and hyphens; spaces
become hyphens, and repeated headings receive numeric suffixes.
When `validation.module_distribution.workspace_files` is true, it reports
committed blob entries whose basename is `go.work` or `go.work.sum`, including
nested paths and symlinks. It checks candidate distribution contents regardless
@@ -71,6 +91,7 @@ For example:
"compile_targets": ["linux/amd64", "linux/arm64"]
},
"go_format": true,
"markdown": {},
"module_distribution": {
"workspace_files": true,
"local_replacements": true
@@ -130,6 +151,10 @@ preserve their causes.
When `validation.file_size` is selected, shared validation checks committed
blob sizes after module-distribution checks and reports the first oversized
path with the `file-size` identity and measured and limit byte counts.
When `validation.markdown` is selected, Markdown checking follows file-size
inspection and runs before configured product checks. Out-of-scope observations
are written to the command's standard error and do not fail validation unless
the checkout boundary is enforced. Submodule observations remain nonfailures.
Configured `checks` commands run afterward, once each in order, as additional
product checks. Artifact builds selected by the separate `build` setting run
after shared validation and product checks.