Skip to content

spell check: link summary items to the source, shorten them, flag unsorted dictionary entries - #1917

Merged
marcleblanc2 merged 2 commits into
mainfrom
spellcheck-summary-links-and-sorted-lists
Sep 11, 2026
Merged

spell check: link summary items to the source, shorten them, flag unsorted dictionary entries#1917
marcleblanc2 merged 2 commits into
mainfrom
spellcheck-summary-links-and-sorted-lists

Conversation

@marcleblanc2

Copy link
Copy Markdown
Contributor

Follow-ups from testing the PR checks on #1913 / #1914.

  • Summary comment: line N, column M is a link to the file in source view (?plain=1) with the flagged word highlighted (#L152C6-L152C14). Each item is now `word` → `first suggestion` instead of the whole line.
  • dev/check-spelling.mjs also flags entries added to cspell-allow-list.txt or cspell-block-list.txt out of alphabetical order. Order is case- and accent-insensitive (Intl.Collator('en', {sensitivity: 'base'})), which is how CSpell matches and how both lists are already sorted (Côte before crashloop); a blank line or # comment starts a new run, so the sectioned top of the allow list is fine. Both lists pass as-is, so no re-sort in this PR.
  • Trailing comments after a word (bazqux # why) are accepted by CSpell (everything from # is stripped) and by this check.
  • Dropped the unused context field from the findings JSON.

Tested locally with cspell@10: misspellings plus out-of-order entries in both lists, --format text / --format json, and post-spelling-review.mjs against a stubbed GitHub API to render the summary and inline comments.

…orted dictionary entries

- Summary comment: line and column link to the file in source view
  (?plain=1) with the word highlighted; each item is
  `word` → `first suggestion` instead of the whole line.
- check-spelling.mjs reports entries added to cspell-allow-list.txt or
  cspell-block-list.txt out of alphabetical order (case- and
  accent-insensitive, like CSpell matches; comments and blank lines
  start a new run). Trailing '# comments' after a word are ignored,
  as CSpell does.
- Drop the unused context field from the JSON findings.

Amp-Thread-ID: https://ampcode.com/threads/T-01a08fee-74b4-76dc-aaf9-d1245d68fdc9
Co-authored-by: Amp <amp@ampcode.com>
@vercel

vercel Bot commented Sep 11, 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 11, 2026 11:34am UTC

Request Review

@marcleblanc2
marcleblanc2 merged commit fdb8323 into main Sep 11, 2026
4 checks passed
@marcleblanc2
marcleblanc2 deleted the spellcheck-summary-links-and-sorted-lists branch September 11, 2026 11:54
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.

2 participants