Skip to content

Conversation

@Sysix
Copy link
Member

@Sysix Sysix commented Oct 14, 2025

just a bit of refactoring. The GetSpan trait is still available for:

filtered_messages.sort_unstable_by_key(GetSpan::span);
FixResult { fixed, fixed_code: Cow::Owned(output), messages: filtered_messages }

@github-actions github-actions bot added A-linter Area - Linter A-editor Area - Editor and Language Server C-cleanup Category - technical debt or refactoring. Solution not expected to change behavior labels Oct 14, 2025
Copy link
Member Author

Sysix commented Oct 14, 2025


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.

@codspeed-hq
Copy link

codspeed-hq bot commented Oct 14, 2025

CodSpeed Performance Report

Merging #14601 will not alter performance

Comparing 10-14-refactor_linter_make_message.span_public (3bfb8e1) with main (544c092)1

Summary

✅ 37 untouched

Footnotes

  1. No successful run was found on main (3bfb8e1) during the generation of this report, so 544c092 was used instead as the comparison base. There might be some changes unrelated to this pull request in this report.

@Sysix Sysix marked this pull request as ready for review October 14, 2025 19:06
@Sysix Sysix requested a review from camc314 as a code owner October 14, 2025 19:06
@Sysix Sysix force-pushed the 10-14-refactor_linter_make_message.span_public branch from 157f993 to 2321721 Compare October 15, 2025 18:04
@Sysix Sysix force-pushed the 10-14-refactor_language_server_use_primary_span_if_available_for_diagnostic_s_range branch from 1c7fb41 to 3fec678 Compare October 15, 2025 18:04
@camc314 camc314 added the 0-merge Merge with Graphite Merge Queue label Oct 15, 2025
Copy link
Contributor

camc314 commented Oct 15, 2025

Merge activity

  • Oct 15, 9:04 PM UTC: The merge label '0-merge' was detected. This PR will be added to the Graphite merge queue once it meets the requirements.
  • Oct 15, 9:52 PM UTC: Merged by the Graphite merge queue.

@camc314 camc314 self-assigned this Oct 15, 2025
@graphite-app graphite-app bot changed the base branch from 10-14-refactor_language_server_use_primary_span_if_available_for_diagnostic_s_range to graphite-base/14601 October 15, 2025 21:08
@graphite-app graphite-app bot force-pushed the 10-14-refactor_linter_make_message.span_public branch from 2321721 to 132c83f Compare October 15, 2025 21:13
@graphite-app graphite-app bot force-pushed the graphite-base/14601 branch from 3fec678 to 9a589ca Compare October 15, 2025 21:13
@graphite-app graphite-app bot changed the base branch from graphite-base/14601 to main October 15, 2025 21:14
@graphite-app graphite-app bot force-pushed the 10-14-refactor_linter_make_message.span_public branch from 132c83f to 0def250 Compare October 15, 2025 21:14
Copilot AI review requested due to automatic review settings October 15, 2025 21:36
@Sysix Sysix force-pushed the 10-14-refactor_linter_make_message.span_public branch from 0def250 to aa1e17b Compare October 15, 2025 21:36
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 refactors the Message struct in the linter by making its span field public, allowing direct access instead of requiring the GetSpan trait. This simplifies the codebase by removing unnecessary trait usage where direct field access is more straightforward.

Key changes:

  • Made Message.span field public
  • Replaced message.span() method calls with direct message.span field access
  • Removed unused GetSpan trait imports

Reviewed Changes

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

Show a summary per file
File Description
crates/oxc_linter/src/fixer/mod.rs Changed span field visibility from private to public
crates/oxc_linter/src/context/mod.rs Updated to access span field directly and removed GetSpan import
crates/oxc_linter/src/tsgolint.rs Updated test to access span field directly and removed GetSpan import
crates/oxc_language_server/src/linter/error_with_position.rs Updated to access span field directly and removed GetSpan import
crates/oxc_language_server/Cargo.toml Removed unused oxc_span dependency

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@Sysix Sysix force-pushed the 10-14-refactor_linter_make_message.span_public branch from aa1e17b to 6a4d11c Compare October 15, 2025 21:41
@graphite-app graphite-app bot force-pushed the 10-14-refactor_linter_make_message.span_public branch from 6a4d11c to 3bfb8e1 Compare October 15, 2025 21:47
@graphite-app graphite-app bot merged commit 3bfb8e1 into main Oct 15, 2025
29 checks passed
@graphite-app graphite-app bot deleted the 10-14-refactor_linter_make_message.span_public branch October 15, 2025 21:52
@graphite-app graphite-app bot removed the 0-merge Merge with Graphite Merge Queue label Oct 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-editor Area - Editor and Language Server A-linter Area - Linter C-cleanup Category - technical debt or refactoring. Solution not expected to change behavior

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants