Skip to content

test(linter/plugins): test fixes in files with unicode#19057

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

test(linter/plugins): test fixes in files with unicode#19057
graphite-app[bot] merged 1 commit intomainfrom
om/02-06-test_linter_plugins_test_fixes_in_files_with_unicode

Conversation

@overlookmotel
Copy link
Member

@overlookmotel overlookmotel commented Feb 6, 2026

Add tests for applying fixes and suggestions in files containing non-ASCII characters, to ensure the UTF-16 -> UTF-8 conversion of fix offsets is working correctly.

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

This PR adds comprehensive test coverage for UTF-16 to UTF-8 conversion of fix offsets in the oxlint linter plugin system. It introduces test fixtures containing Unicode emoji characters and Byte Order Marks (BOM) to ensure that code fixes are applied at the correct positions when multi-byte characters are present.

Changes:

  • Added two new test fixture files (unicode.js and bom_and_unicode.js) to both the fixes and suggestions test directories
  • Updated snapshot files to reflect the expected output when linting and fixing files with Unicode characters

Reviewed changes

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

Show a summary per file
File Description
apps/oxlint/test/fixtures/suggestions/files/unicode.js New test fixture with Unicode emoji characters to test fix offset conversion
apps/oxlint/test/fixtures/suggestions/files/bom_and_unicode.js New test fixture with BOM and Unicode emojis to test combined offset handling
apps/oxlint/test/fixtures/fixes/files/unicode.js New test fixture for fixes plugin with Unicode emoji characters
apps/oxlint/test/fixtures/fixes/files/bom_and_unicode.js New test fixture for fixes plugin with BOM and Unicode emojis
apps/oxlint/test/fixtures/suggestions/output.snap.md Updated snapshot with expected linting output for new Unicode test files (25 errors across 4 files)
apps/oxlint/test/fixtures/suggestions/fix.snap.md Updated snapshot with expected fix output for new Unicode test files
apps/oxlint/test/fixtures/suggestions/fix-suggestions.snap.md Updated snapshot showing files are correctly fixed with Unicode preservation
apps/oxlint/test/fixtures/fixes/output.snap.md Updated snapshot with expected linting output for new Unicode test files (24 errors across 4 files)
apps/oxlint/test/fixtures/fixes/fix.snap.md Updated snapshot showing fixes are correctly applied with BOM and emoji preservation

💡 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

@graphite-app graphite-app bot force-pushed the om/02-06-fix_linter_plugins_fix_fixes_in_files_with_bom branch from 18aa98a to 4823b58 Compare February 6, 2026 12:59
graphite-app bot pushed a commit that referenced this pull request Feb 6, 2026
Add tests for applying fixes and suggestions in files containing non-ASCII characters, to ensure the UTF-16 -> UTF-8 conversion of fix offsets is working correctly.
@graphite-app graphite-app bot force-pushed the om/02-06-test_linter_plugins_test_fixes_in_files_with_unicode branch from e5778cb to d44ed04 Compare February 6, 2026 13:00
@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-fix_linter_plugins_fix_fixes_in_files_with_bom to main February 6, 2026 13:07
Add tests for applying fixes and suggestions in files containing non-ASCII characters, to ensure the UTF-16 -> UTF-8 conversion of fix offsets is working correctly.
@graphite-app graphite-app bot force-pushed the om/02-06-test_linter_plugins_test_fixes_in_files_with_unicode branch from d44ed04 to 6e54567 Compare February 6, 2026 13:08
@graphite-app graphite-app bot merged commit 6e54567 into main Feb 6, 2026
19 checks passed
@graphite-app graphite-app bot deleted the om/02-06-test_linter_plugins_test_fixes_in_files_with_unicode branch February 6, 2026 13:17
OskarLebuda pushed a commit to OskarLebuda/oxc that referenced this pull request Feb 17, 2026
…9057)

Add tests for applying fixes and suggestions in files containing non-ASCII characters, to ensure the UTF-16 -> UTF-8 conversion of fix offsets is working correctly.
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