-
-
Notifications
You must be signed in to change notification settings - Fork 735
test(oxlint/lsp): add CodeAction.is_preferred info to snapshot files
#16513
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
test(oxlint/lsp): add CodeAction.is_preferred info to snapshot files
#16513
Conversation
How to use the Graphite Merge QueueAdd either label to this PR to merge it via the merge queue:
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. |
Merge activity
|
e12d085 to
a7fa043
Compare
There was a problem hiding this 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 test snapshot files by adding CodeAction.is_preferred field information. The change improves test coverage by capturing whether code actions are marked as preferred in the Language Server Protocol (LSP) responses, which helps verify that the most appropriate fixes are correctly marked for IDE auto-fix functionality.
- Added
is_preferredoutput to theget_snapshot_for_code_actionfunction using debug formatting - Updated all 17 snapshot files that contain code actions with the new field
- Preferred actions (actual fixes) show
Some(true), while alternative fixes and disable-rule actions showSome(false)
Reviewed changes
Copilot reviewed 18 out of 18 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
crates/oxc_language_server/src/linter/tester.rs |
Added writeln statement to include is_preferred field in code action snapshots |
crates/oxc_language_server/src/linter/snapshots/[email protected] |
Updated snapshot with is_preferred values for 6 code actions (fixes and disable options) |
crates/oxc_language_server/src/linter/snapshots/[email protected] |
Updated snapshot with is_preferred values for 9 code actions (various fixes and disable options) |
crates/oxc_language_server/src/linter/snapshots/[email protected] |
Updated snapshot with is_preferred values for 4 code actions related to floating promises |
crates/oxc_language_server/src/linter/snapshots/fixtures_linter_tsgolint@no-floating-promises__index.ts.snap |
Updated snapshot with is_preferred values for 20 code actions involving promise handling |
crates/oxc_language_server/src/linter/snapshots/fixtures_linter_ts_path_alias@deep__src__dep-a.ts.snap |
Updated snapshot with is_preferred values for 2 code actions for cycle detection |
crates/oxc_language_server/src/linter/snapshots/[email protected] |
Updated snapshot with is_preferred values for 7 code actions in Svelte files |
crates/oxc_language_server/src/linter/snapshots/[email protected] |
Updated snapshot with is_preferred values for 5 code actions related to regex patterns |
crates/oxc_language_server/src/linter/snapshots/fixtures_linter_multiple_suggestions@forward_ref.ts.snap |
Updated snapshot with is_preferred values for 4 code actions with multiple fix suggestions |
crates/oxc_language_server/src/linter/snapshots/[email protected] |
Updated snapshot with is_preferred values for 3 debugger-related code actions |
crates/oxc_language_server/src/linter/snapshots/[email protected] |
Updated snapshot with is_preferred values for 4 code actions for boolean cast and optional chain issues |
crates/oxc_language_server/src/linter/snapshots/[email protected]_another_config__not-ignored-file.ts.snap |
Updated snapshot with is_preferred values for 3 debugger-related code actions |
crates/oxc_language_server/src/linter/snapshots/fixtures_linter_deny_no_console@hello_world.js.snap |
Updated snapshot with is_preferred values for 2 console-related code actions |
crates/oxc_language_server/src/linter/snapshots/[email protected]_folder__folder-dep-a.ts.snap |
Updated snapshot with is_preferred values for 2 cycle detection code actions |
crates/oxc_language_server/src/linter/snapshots/[email protected] |
Updated snapshot with is_preferred values for 2 cycle detection code actions |
crates/oxc_language_server/src/linter/snapshots/[email protected] |
Updated snapshot with is_preferred values for 2 cycle detection code actions |
crates/oxc_language_server/src/linter/snapshots/[email protected] |
Updated snapshot with is_preferred values for 3 debugger-related code actions |
crates/oxc_language_server/src/linter/snapshots/[email protected] |
Updated snapshot with is_preferred values for 12 debugger-related code actions in Astro files |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

No description provided.