-
-
Notifications
You must be signed in to change notification settings - Fork 708
refactor(linter): make Message.span public
#14601
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
refactor(linter): make Message.span public
#14601
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. |
CodSpeed Performance ReportMerging #14601 will not alter performanceComparing Summary
Footnotes |
157f993 to
2321721
Compare
1c7fb41 to
3fec678
Compare
Merge activity
|
2321721 to
132c83f
Compare
3fec678 to
9a589ca
Compare
132c83f to
0def250
Compare
0def250 to
aa1e17b
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 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.spanfield public - Replaced
message.span()method calls with directmessage.spanfield access - Removed unused
GetSpantrait 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.
aa1e17b to
6a4d11c
Compare
just a bit of refactoring. The `GetSpan` trait is still available for: https://github.com/oxc-project/oxc/blob/e7c2748614453e7db707e53896e63f728bbc26b7/crates/oxc_linter/src/fixer/mod.rs#L374-L375
6a4d11c to
3bfb8e1
Compare

just a bit of refactoring. The
GetSpantrait is still available for:oxc/crates/oxc_linter/src/fixer/mod.rs
Lines 374 to 375 in e7c2748