test(linter/plugins): tests for fixes/suggestions include partial composite replacement#19055
Merged
graphite-app[bot] merged 1 commit intomainfrom Feb 6, 2026
Conversation
Member
Author
This was referenced Feb 6, 2026
This was referenced Feb 6, 2026
Contributor
There was a problem hiding this comment.
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 (
numpty→rage). - 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.
Contributor
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.
bd47dc4 to
d8055fe
Compare
80b9dca to
58b5572
Compare
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
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

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_fallibleworks correctly when the combined fix includes a section of original source code.