Repository navigation
v0.27.0: cms validate - #22
Merged
Merged
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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,visibleIfpaths, 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|linksnarrows the run,--collectionlimits it to one collection,--fail-on warning|error|nonepicks what fails the exit code (defaulterror).Changes for scripts
invalid(exit 1): findings at the--fail-onseverity were found;detailsholds the counts and stdout the report.cms validate -o jsonprints{schemaVersion, path, findings[], summary}; rule ids are frozen in the module.Also
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.