Skip to content

v0.27.0: cms validate - #22

Merged
jansvabik merged 1 commit into
mainfrom
feat/cms-validate
Nov 15, 2026
Merged

jansvabik merged 1 commit into
mainfrom
feat/cms-validate

Conversation

@jansvabik

Copy link
Copy Markdown
Member

New

norcube cms validate [path] checks a Norcube CMS site from its repository, offline and without a sign-in: the schema in .norcube/cms/ (YAML, $ref, field types and knobs, options, bounds, regexes, visibleIf paths, storages, preview), every content file against its collection (the editor's rules) and the links between files (two files at one URL, links no page produces, missing images, dangling references).

  • --only schema|content|links narrows the run, --collection limits it to one collection, --fail-on warning|error|none picks what fails the exit code (default error).
  • The checks come from the public cms-schema module (v0.1.1), so a site's CI runs exactly what the editor runs.

Changes for scripts

  • New error code invalid (exit 1): findings at the --fail-on severity were found; details holds the counts and stdout the report.
  • cms validate -o json prints {schemaVersion, path, findings[], summary}; rule ids are frozen in the module.

Also

  • Built with Go 1.26.11 (GO-2026-6859 in the standard library).
  • docs/DESIGN.md: exit-code table, feature inventory and a decision-log row for the command.

Docs: norcubeplatform/docs branch docs/cms-validate (new page /cms/validate and the regenerated reference). Checks run: build, vet, go test -race, go mod tidy -diff, govulncheck, golangci-lint 2.12.2, make docs.

norcube cms validate [path] runs the checks of the public cms-schema
module over a site checkout, offline: the schema in .norcube/cms/, every
content file against its collection and the links between files. --only
narrows the run to schema, content or links, --collection to one
collection, --fail-on picks the severity that fails the exit code
(default error). A failed run uses the new error code invalid (exit 1)
and still prints the report. Also builds with Go 1.26.11 (GO-2026-6859).

Signed-off-by: Jan Švábík <jansvabik@jansvabik.cz>
@jansvabik
jansvabik merged commit 0d935c9 into main Nov 15, 2026
2 checks passed
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