Skip to content

test(linter/plugins): tests for fixes/suggestions include partial composite replacement#19055

Merged
graphite-app[bot] merged 1 commit intomainfrom
om/02-06-test_linter_plugins_tests_for_fixes_suggestions_include_partial_composite_replacement
Feb 6, 2026
Merged

test(linter/plugins): tests for fixes/suggestions include partial composite replacement#19055
graphite-app[bot] merged 1 commit intomainfrom
om/02-06-test_linter_plugins_tests_for_fixes_suggestions_include_partial_composite_replacement

Conversation

@overlookmotel
Copy link
Member

@overlookmotel overlookmotel commented Feb 6, 2026

Alter tests for fixes and suggestions. One fix now adds text before and after a node, without altering the node itself. This checks that CompositeFix::merge_fixes_fallible works correctly when the combined fix includes a section of original source code.

Copy link
Member Author

overlookmotel commented Feb 6, 2026


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.

This stack of pull requests is managed by Graphite. Learn more about stacking.

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

Updates the oxlint test fixtures/snapshots so a fix/suggestion for identifier "g" is composed of two insertions that wrap the original source ("g") rather than replacing it, exercising CompositeFix::merge_fixes_fallible when the merged output must include an unchanged slice of the original code.

Changes:

  • Adjust the "g" fix/suggestion in fixture plugins to insert "ra" before and "e" after the node (producing "rage" while keeping the node text intact).
  • Update related snapshot expectations to reflect the new message and fixed output (numptyrage).
  • Keep fix ordering intentionally non-sorted to continue validating order-independence during merge.

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated no comments.

Show a summary per file
File Description
apps/oxlint/test/fixtures/suggestions/plugin.ts Changes "g" suggestion fix to insert before/after the node (wraps original text).
apps/oxlint/test/fixtures/suggestions/output.snap.md Updates expected diagnostic message for "g" to "rage".
apps/oxlint/test/fixtures/suggestions/fix.snap.md Updates expected diagnostic message for "g" to "rage".
apps/oxlint/test/fixtures/suggestions/fix-suggestions.snap.md Updates expected fixed output line to let rage = 7;.
apps/oxlint/test/fixtures/fixes/plugin.ts Changes "g" fix to insert before/after the node (wraps original text).
apps/oxlint/test/fixtures/fixes/output.snap.md Updates expected diagnostic message for "g" to "rage".
apps/oxlint/test/fixtures/fixes/fix.snap.md Updates expected fixed output line to let rage = 7;.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@overlookmotel overlookmotel self-assigned this Feb 6, 2026
@graphite-app graphite-app bot added the 0-merge Merge with Graphite Merge Queue label Feb 6, 2026
@graphite-app
Copy link
Contributor

graphite-app bot commented Feb 6, 2026

Merge activity

…posite replacement (#19055)

Alter tests for fixes and suggestions. One fix now adds text before and after a node, without altering the node itself. This checks that `CompositeFix::merge_fixes_fallible` works correctly when the combined fix includes a section of original source code.
@graphite-app graphite-app bot force-pushed the om/02-06-test_linter_plugins_test_fixes_and_suggestions_at_very_end_of_file branch from bd47dc4 to d8055fe Compare February 6, 2026 12:58
@graphite-app graphite-app bot force-pushed the om/02-06-test_linter_plugins_tests_for_fixes_suggestions_include_partial_composite_replacement branch from 80b9dca to 58b5572 Compare February 6, 2026 12:58
@graphite-app graphite-app bot removed the 0-merge Merge with Graphite Merge Queue label Feb 6, 2026
Base automatically changed from om/02-06-test_linter_plugins_test_fixes_and_suggestions_at_very_end_of_file to main February 6, 2026 13:05
@graphite-app graphite-app bot merged commit 58b5572 into main Feb 6, 2026
20 checks passed
@graphite-app graphite-app bot deleted the om/02-06-test_linter_plugins_tests_for_fixes_suggestions_include_partial_composite_replacement branch February 6, 2026 13:06
OskarLebuda pushed a commit to OskarLebuda/oxc that referenced this pull request Feb 17, 2026
…posite replacement (oxc-project#19055)

Alter tests for fixes and suggestions. One fix now adds text before and after a node, without altering the node itself. This checks that `CompositeFix::merge_fixes_fallible` works correctly when the combined fix includes a section of original source code.
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 A-linter-plugins Area - Linter JS plugins 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.

1 participant

Comments