Skip to content

Conversation

@lilnasy
Copy link
Contributor

@lilnasy lilnasy commented Oct 19, 2025

Part of #14564. Makes the tests for comment spans more comprehensive.

@lilnasy lilnasy marked this pull request as ready for review October 19, 2025 15:02
@graphite-app
Copy link
Contributor

graphite-app bot commented Oct 19, 2025

How to use the Graphite Merge Queue

Add either label to this PR to merge it via the merge queue:

  • 0-merge - adds this PR to the back of the merge queue
  • hotfix - for urgent hot fixes, skip the queue and merge this PR next

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.

@lilnasy lilnasy requested a review from camc314 as a code owner October 19, 2025 15:02
Copilot AI review requested due to automatic review settings October 19, 2025 15:02
@github-actions github-actions bot added A-linter Area - Linter A-cli Area - CLI C-cleanup Category - technical debt or refactoring. Solution not expected to change behavior labels Oct 19, 2025
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@camc314 camc314 force-pushed the chore/linter/comments-test branch from 5a34b58 to 63bf3c2 Compare October 20, 2025 08:20
@camc314 camc314 changed the title chore(linter): snapshot test start, end, range, and loc for comments test(linter/custom-plugins): snapshot test start, end, range, and loc for comments Oct 20, 2025
@github-actions github-actions bot added the C-test Category - Testing. Code is missing test cases, or a PR is adding them label Oct 20, 2025
Copy link
Contributor

@camc314 camc314 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

@camc314 camc314 merged commit 6570f36 into oxc-project:main Oct 20, 2025
18 checks passed
@camc314 camc314 self-assigned this Oct 20, 2025
@lilnasy lilnasy deleted the chore/linter/comments-test branch October 20, 2025 08:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-cli Area - CLI A-linter Area - Linter C-cleanup Category - technical debt or refactoring. Solution not expected to change behavior C-test Category - Testing. Code is missing test cases, or a PR is adding them

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants