Skip to content

Conversation

@Sysix
Copy link
Member

@Sysix Sysix commented Nov 5, 2025

This PR refactors the ServerLinter initialization to use a builder pattern, separating construction logic from the linter instance itself. The main purpose is to improve code organization and API design.

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

Sysix commented Nov 5, 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.

@Sysix Sysix changed the base branch from 11-05-refactor_language_server_store_serde_json_value_for_workspaceworker_option to graphite-base/15282 November 5, 2025 18:52
@Sysix Sysix force-pushed the graphite-base/15282 branch from a7fd005 to 6bfe7ee Compare November 5, 2025 18:53
@Sysix Sysix force-pushed the 11-05-refactor_language_server_split_serverlinter_creation_with_builder_pattern branch from 58be109 to 1e77275 Compare November 5, 2025 18:53
@Sysix Sysix changed the base branch from graphite-base/15282 to 11-05-refactor_language_server_store_serde_json_value_for_workspaceworker_option November 5, 2025 18:53
@Sysix Sysix requested a review from Copilot November 5, 2025 18:55
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 ServerLinter initialization to use a builder pattern, separating construction logic from the linter instance itself. The main purpose is to improve code organization and API design.

  • Introduced ServerLinterBuilder to handle the construction of ServerLinter instances
  • Changed ServerLinter::new() from a constructor to a simpler initialization method
  • Updated the refresh_server_linter() method to take owned LintOptions instead of a reference

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
crates/oxc_language_server/src/worker.rs Updated all call sites to use the new ServerLinterBuilder API and changed refresh_server_linter parameter from reference to owned value
crates/oxc_language_server/src/linter/server_linter.rs Split ServerLinter into two types: ServerLinterBuilder for construction logic and ServerLinter for runtime operations

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@graphite-app
Copy link
Contributor

graphite-app bot commented Nov 6, 2025

Merge activity

@graphite-app graphite-app bot force-pushed the 11-05-refactor_language_server_store_serde_json_value_for_workspaceworker_option branch from 6bfe7ee to 98d7869 Compare November 6, 2025 01:29
graphite-app bot pushed a commit that referenced this pull request Nov 6, 2025
…er` pattern (#15282)

> This PR refactors the ServerLinter initialization to use a builder pattern, separating construction logic from the linter instance itself. The main purpose is to improve code organization and API design.
@graphite-app graphite-app bot force-pushed the 11-05-refactor_language_server_split_serverlinter_creation_with_builder_pattern branch from 1e77275 to 06bbb5d Compare November 6, 2025 01:30
@graphite-app graphite-app bot force-pushed the 11-05-refactor_language_server_store_serde_json_value_for_workspaceworker_option branch from 98d7869 to 000a891 Compare November 6, 2025 01:33
graphite-app bot pushed a commit that referenced this pull request Nov 6, 2025
…er` pattern (#15282)

> This PR refactors the ServerLinter initialization to use a builder pattern, separating construction logic from the linter instance itself. The main purpose is to improve code organization and API design.
@graphite-app graphite-app bot force-pushed the 11-05-refactor_language_server_split_serverlinter_creation_with_builder_pattern branch from 06bbb5d to 5f81e63 Compare November 6, 2025 01:34
Base automatically changed from 11-05-refactor_language_server_store_serde_json_value_for_workspaceworker_option to main November 6, 2025 01:38
@graphite-app graphite-app bot added the 0-merge Merge with Graphite Merge Queue label Nov 6, 2025
…er` pattern (#15282)

> This PR refactors the ServerLinter initialization to use a builder pattern, separating construction logic from the linter instance itself. The main purpose is to improve code organization and API design.
@graphite-app graphite-app bot force-pushed the 11-05-refactor_language_server_split_serverlinter_creation_with_builder_pattern branch from 5f81e63 to 55222ab Compare November 6, 2025 02:32
@graphite-app graphite-app bot merged commit 55222ab into main Nov 6, 2025
21 checks passed
@graphite-app graphite-app bot deleted the 11-05-refactor_language_server_split_serverlinter_creation_with_builder_pattern branch November 6, 2025 02:37
@graphite-app graphite-app bot removed the 0-merge Merge with Graphite Merge Queue label Nov 6, 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 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.

2 participants