test(linter/custom-plugins): snapshot test start, end, range, and loc for comments#14779
Conversation
How to use the Graphite Merge QueueAdd either label to this PR to merge it via the merge queue:
You must have a Graphite account in order to use the merge queue. Sign up using this link. An organization admin has enabled the Graphite Merge Queue in this repository. Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue. |
There was a problem hiding this comment.
Pull Request Overview
This PR enhances the unicode-comments test fixture to snapshot precise comment spans by iterating all comments, asserting start/end against range, and reporting per-comment locations for clearer snapshots.
- Add assertions verifying comment.start/end align with comment.range.
- Report each comment with its loc-derived "lines" and value, changing snapshot from a single aggregate to per-comment entries.
- Update snapshot to reflect per-comment diagnostics (11 total) with caret highlights.
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| apps/oxlint/test/fixtures/unicode-comments/plugin.ts | Switch to per-comment reporting, add start/end vs range assertions, and include loc info in messages. |
| apps/oxlint/test/fixtures/unicode-comments/output.snap.md | Update expected snapshot to match per-comment outputs and counts. |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
5a34b58 to
63bf3c2
Compare
Part of #14564. Makes the tests for comment spans more comprehensive.