Skip to content

ci: add advisory CSpell check - #1853

Open
marcleblanc2 wants to merge 2 commits into
mainfrom
add-cspell-pr-check
Open

ci: add advisory CSpell check#1853
marcleblanc2 wants to merge 2 commits into
mainfrom
add-cspell-pr-check

Conversation

@marcleblanc2

@marcleblanc2 marcleblanc2 commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

Summary

  • add CSpell 9 as a pnpm dev dependency and expose pnpm spellcheck for full-repository local checks, including dotfiles
  • add a checked-in Sourcegraph/project dictionary and explicitly flag likely legacy misspellings
  • on pull requests, report only spelling errors on lines added by the PR, so existing repository findings are ignored
  • create or update one PR comment containing grouped file, line, column, word, and context details; resolve the comment after fixes
  • keep the PR check advisory while preserving the local command's failing exit code
  • document that CSpell is only installed by pnpm and does not run automatically during normal development

Fork PRs have a read-only token, so their report appears in the workflow log without a PR comment.

Verification

  • simulated an added typo: the diff checker exited 1 and reported exactly that word, line, column, and context
  • reverted the typo: the diff checker exited 0 despite pre-existing repository findings
  • Prettier checks passed for the script, package/config, and workflow
  • workflow YAML parsed successfully and every shell run block passed bash -n
  • node --check dev/check-spelling.mjs
  • git diff --check

Exclusions

CSpell honors .gitignore, so dependency, cache, and build output remain excluded. The full local check additionally skips binary image/font formats, pnpm-lock.yaml, CSpell's own config/dictionary, and checked-in generated outputs (docs/technical-changelog.mdx, generated observability alert/dashboard references, and the generated AWS icon module).

@vercel

vercel Bot commented Sep 4, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
sourcegraph-docs Ready Ready Preview Sep 6, 2026 10:36am UTC

Request Review

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