test(linter/plugins): test fixes and suggestions at very end of file#19054
Merged
graphite-app[bot] merged 1 commit intomainfrom Feb 6, 2026
Conversation
Member
Author
This was referenced Feb 6, 2026
Contributor
There was a problem hiding this comment.
Pull request overview
This PR enhances test fixtures for the oxlint plugin system by ensuring that fixes and suggestions can be properly tested when applied at the very end of a file (without trailing newlines). The changes add safeguards to prevent accidental formatting of these special test fixtures.
Changes:
- Added formatter exclusions for fixture file directories to prevent automatic formatting
- Added runtime assertions in test plugins to detect if fixture files have been accidentally formatted
- Updated test fixtures and snapshots to remove trailing newlines
Reviewed changes
Copilot reviewed 6 out of 8 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| oxfmtrc.jsonc | Excludes fixes and suggestions fixture directories from auto-formatting |
| apps/oxlint/test/fixtures/suggestions/plugin.ts | Adds assertion to detect accidental formatting of fixtures |
| apps/oxlint/test/fixtures/suggestions/fix-suggestions.snap.md | Updates snapshot to reflect fixture without trailing newline |
| apps/oxlint/test/fixtures/suggestions/files/index.js | Removes trailing newline to test suggestions at EOF |
| apps/oxlint/test/fixtures/fixes/plugin.ts | Adds assertion to detect accidental formatting of fixtures |
| apps/oxlint/test/fixtures/fixes/fix.snap.md | Updates snapshot to reflect fixture without trailing newline |
| apps/oxlint/test/fixtures/fixes/files/index.js | Removes trailing newline to test fixes at EOF |
| apps/oxlint/test/fixtures/bom/plugin.ts | Adds assertion to detect accidental formatting of fixtures |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This was referenced Feb 6, 2026
Contributor
Merge activity
|
…19054) Alter test fixtures for fixes and suggestions. Remove trailing newline from end of fixture files, so that the last fix the plugin makes is at very end of file - makes sure fixes in this position still work. Add checks to these tests and also the BOM test to catch if these fixture files accidentally get formatted, which would add a trailing newline and prevent the tests testing what they should do.
3cde087 to
a8ae9a9
Compare
bd47dc4 to
d8055fe
Compare
Base automatically changed from
om/02-05-test_linter_plugins_reduce_nesting_in_test_plugin_code
to
main
February 6, 2026 13:04
graphite-app bot
pushed a commit
that referenced
this pull request
Feb 6, 2026
Fix a nit spotted by AI in #19054 (comment).
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 test fixtures for fixes and suggestions.
Remove trailing newline from end of fixture files, so that the last fix the plugin makes is at very end of file - makes sure fixes in this position still work.
Add checks to these tests and also the BOM test to catch if these fixture files accidentally get formatted, which would add a trailing newline and prevent the tests testing what they should do.