Repository navigation
v0.28.0: cms validate --quality and --git, site folder hint - #23
Merged
Merged
Conversation
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>
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.
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.