Skip to content

v0.28.0: cms validate --quality and --git, site folder hint - #23

Merged
jansvabik merged 7 commits into
mainfrom
feat/cms-validate-quality
Nov 25, 2026
Merged

jansvabik merged 7 commits into
mainfrom
feat/cms-validate-quality

Conversation

@jansvabik

Copy link
Copy Markdown
Member

Bumps cms-schema to v0.10.0 and adds content quality checks to nrc cms validate: --quality, --strict-quality, --git (dates from git history for translation_outdated). Not released; release after review.

Backup's API document now gives every route an id, so the generated
client's methods are named after what they do (ListDatasources,
ListBackupPolicies, AttachPolicy, SetDatasourceCredentials, ...)
instead of their paths. The commands call the new names; nothing they
do changes.

Generated from backend-mono's snapdb ids change (23060630); merge after
it reaches the backend's main branch, so codegen-check agrees.

Signed-off-by: Jan Švábík <jansvabik@jansvabik.cz>
`nrc cms validate` now checks how a collection links its language
versions (`translations.by`) and reports two pages of one language that
share a translation key. Moves from cms-schema 0.1.1 to 0.2.0, which
also brings 0.1.2's fix for collections sharing a directory.

Signed-off-by: Jan Švábík <jansvabik@jansvabik.cz>
Moves `nrc cms validate` from cms-schema 0.2.0 to 0.10.0 and adds the
module's content quality checks:

- `--quality` adds validate.ScopeQuality with the checkout's media files
  and root files, so the search, accessibility, language and media rules
  run. Quality findings are warnings and notices, never errors; notices
  never fail a run.
- `--strict-quality` turns quality warnings into errors.
- `--git` (only with --quality) reads when each file last changed from
  the git history with a deadline, so quality.translation_outdated runs.
  A git failure ends the run with usage_error, timeout or error instead
  of silently skipping the check.

`-o json` gains summary.notices and a `quality` summary; the table shows
the language after the path for per-language findings and names the
rules quality skipped or guessed about on stderr.

Signed-off-by: Jan Švábík <jansvabik@jansvabik.cz>
Signed-off-by: Jan Švábík <jansvabik@jansvabik.cz>
cms-schema 0.11.0 judges quality.translation_outdated by the translatable
texts the source changed since the translation was last current with it,
not by file dates. --git now hands validate.Site a reader of the source's
earlier versions (gitlog.SourceBases) under the same deadline; a read
failure still ends the run with usage_error, timeout, error or an
interrupt, and the deadline or the interrupt decides the code before
what git printed.

Tests pin the contract on a real repository: a changed link is no
change, a changed title makes the translation outdated, a translation
edited in the working tree is current, and outside a checkout --git is a
usage error.

The changelog gets the 0.27.0 heading the release left out.

Signed-off-by: Jan Švábík <jansvabik@jansvabik.cz>
A clone made with --depth, the default of actions/checkout, lists every
file as added by its oldest commit, so every translation looked current
and --git passed in CI without a word. cms-schema 0.11.1 returns
gitlog.ErrShallowHistory for it; the CLI maps it to usage_error with a
hint to fetch the full history (git fetch --unshallow, or fetch-depth: 0)
or drop --git. Help, README and changelog say CI needs the full history.

Signed-off-by: Jan Švábík <jansvabik@jansvabik.cz>
@jansvabik jansvabik changed the title cms validate: --quality, --strict-quality, --git (cms-schema v0.10.0) v0.28.0: cms validate --quality and --git, site folder hint Nov 25, 2026
Signed-off-by: Jan Švábík <jansvabik@jansvabik.cz>
@jansvabik
jansvabik merged commit 0494ba0 into main Nov 25, 2026
3 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