Repository navigation
chore: lint the docs and cookbook Markdown with redocly recheck - #3187
Conversation
|
Coverage Report
File CoverageNo changed files found. |
Performance Benchmark (Lower is Faster)
|
📝 Recheck Summary
📋 Findings by rule🟡 technical-english/sentence-length: 0 errors, 11 warnings, 0 info Errors fail the full-tree check. Warnings and info are a worklist and do not block the PR. 📖 Readability of changed filesAutomated Readability Index (ARI): a U.S. grade level. Lower is easier to read.
|
…se run can score files
…eading-time budget The recheck job runs @redocly/cli@2.58.1 with npx. It does not install or compile the repository now. Add recheck/page-reading-time for docs and cookbook at warn. Three pages are over the 15-minute budget. The recheck docs from main show British spellings in swap-pair examples. Add line exceptions to recheck/us-spelling for these pairs. Update the measurement date and the technical-english counts.
The repository root declares @redocly/cli as a workspace at version 2.58.1. In a checkout without node_modules, npx takes that workspace package as installed. It does not download the release, and the call fails with "redocly: command not found". The --prefix /tmp flag makes npx resolve the pinned release.
… the retired blog post
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 01cbe68. Configure here.
tatomyr
left a comment
There was a problem hiding this comment.
Left a couple of comments to consider. Otherwise LGTM.
The recheck job now builds the repository and installs the local pack, as the smoke workflows do. A PR that changes a recheck rule now shows its effect on the docs in the same run. The RECHECK variable and the npx --prefix /tmp workaround are no longer necessary.

What/Why/How?
Adds a
recheckjob to the documentation tests workflow so Redocly CLI lints its own Markdown withredocly recheck, next to the markdownlint, vale, and linkcheck jobs. The job is a port of the monorepo'srecheck.yml, adapted to this CLI's flags.The steps are
npm ci,npm run pack:prepare, andnpm i -g ./redocly-cli.tgz.This way, a PR that changes a recheck rule shows its effect on the docs in the same run.
The cost is a few minutes of build time on each docs PR.
docs/redocly.yamland is passed with--config. Aredocly.yamlin the repository root would change the CLI package's unit tests.--summary json. The full tree gates on errors only, because deleting a file or renaming a heading breaks links in files a PR never touched. Readability is scored for changed files on the PR head and on the merge-base from detached worktrees.--changed-onlyor--severityflag, so the job passes the changed files as paths and uses--max-problemson the full-tree step: errors sort first, so the cap only trims the warning backlog.Rules ported from the monorepo
docs/redocly.yamlkeeps the.markdownlint.yamlparity settings and ports the monorepo'srecheck.yaml, with severities set from a measurement of this tree:recheck/markdown,recheck/markdoc,recheck/plain-language,recheck/technical-english,recheck/inclusive-language.us-spelling,inclusion-gender-culture,oxford-comma,no-trailing-spaces,bullet-style-dash,no-hard-tabs,no-duplicate-headings,no-broken-fragment-links(cross-file).semantic-line-breaks(628),readable-line-length(22),no-gerund-headings(4),optimize-images(3), plus the preset defaults forsentence-length,paragraph-length,excess-intensifiers, andparagraph-sentence-count.passive-voicestays at info.page-reading-timeapplies todocs/**andcookbook/**at warn, with a 15-minute limit at 200 words per minute.Three pages are over the limit: both changelogs and
guides/use-generated-client.md.front-matter(these docs have none),markdoc-tables-only(this repo uses pipe tables), andpitch-reading-time(this repo has no pitches).skill-lengthis also not ported.The job does not scan
SKILL.mdfiles, and the skills tree is not at zero errors under this config.In
.claude/skillsandpackages/recheck/skills,us-spellingreportsneighbourinredocly-lint-rules/SKILL.md.That skill also has 3,253 prose words, over the 1,500-word budget.
Docs fixes
The first run found 12 errors in the
no-ambiguous-pathsandno-identical-pathsrule pages (v1 and v2).Those fixes landed on
mainin #3188, so this PR does not carry them now.This PR still fixes one British spelling in the cookbook (
fulfil).The recheck docs from #3182 show British spellings in swap-pair examples on purpose, for example
colour: color.us-spellinghas a line exception for each of these five pairs.With those changes, the tree has no errors and needs no baseline file.
No changeset: repository tooling and docs only. The command docs ship separately in #3182.
Reference
.github/workflows/recheck.ymlandrecheck.yamlTesting
Ran locally after the merge of
main, with the CLI from the local pack (2.59.0):npm ci,npm run pack:prepare, andnpm i -g ./redocly-cli.tgz --prefix /tmp/recheck-pack-probeinstall the pack.The temporary prefix keeps the global install unchanged.
redocly recheck docs cookbook --config docs/redocly.yaml --format=github-actions --max-problems 50scans 384 files, reports 0 errors, and exits 0.It also reports 2,376 warnings and info.
A temporary file with a trailing-punctuation heading produces a
::errorannotation and exit code 1.docs/redocly.yaml, reads the config from an absolute path, and scores each file.npx oxfmt --check .githubpasses, andjs-yamlparsesdocs-tests.yaml.The machine has no
actionlintoryamllint.Check yourself
Security
🤖 Generated with Claude Code
Note
Low Risk
CI and documentation-only changes; no runtime product code, with gating limited to docs lint errors and optional PR comments.
Overview
Adds a
recheckGitHub Actions job alongside markdownlint, Vale, and linkcheck sodocs/andcookbook/Markdown is linted withredocly recheckusing a newdocs/redocly.yaml(not at repo root, to avoid affecting CLI unit tests). The job diffs PR-touched Markdown, annotates changed files, fails the build if the full tree has recheck errors, scores readability on head vs merge-base, and updates a PR comment with rule breakdowns and an ARI table.docs/redocly.yamlextends recheck presets (markdown, markdoc, plain-language, technical-english, inclusive-language) with severities tuned to the current tree: zero-backlog rules at error, known backlog items at warn (e.g. semantic line breaks, line length).Small cookbook edits: US spelling fulfill, and an updated Spectral OWASP ruleset link.
Reviewed by Cursor Bugbot for commit bbd44bc. Bugbot is set up for automated code reviews on this repo. Configure here.