Skip to content

refactor(linter): extract config searching functions to their own file#18673

Merged
graphite-app[bot] merged 1 commit intomainfrom
c/01-28-refactor_linter_extract_config_searching_functions_to_their_own_file
Jan 29, 2026
Merged

refactor(linter): extract config searching functions to their own file#18673
graphite-app[bot] merged 1 commit intomainfrom
c/01-28-refactor_linter_extract_config_searching_functions_to_their_own_file

Conversation

@camc314
Copy link
Contributor

@camc314 camc314 commented Jan 28, 2026

move the funcitons that search for config files out of sever_linter.rs/lint.rs into config_loader so that they're all in the same place

@github-actions github-actions bot added A-linter Area - Linter A-cli Area - CLI C-cleanup Category - technical debt or refactoring. Solution not expected to change behavior labels Jan 28, 2026
Copy link
Contributor Author

camc314 commented Jan 28, 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.

@camc314 camc314 marked this pull request as ready for review January 28, 2026 19:40
Copilot AI review requested due to automatic review settings January 28, 2026 19:40
@camc314 camc314 force-pushed the c/01-28-refactor_linter_extract_config_searching_functions_to_their_own_file branch from 0b780a0 to e11cb0f Compare January 28, 2026 19:43
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

Refactors oxlint’s config discovery by centralizing config file search logic in config_loader, and updating both CLI and LSP call sites to use the shared helpers.

Changes:

  • Added shared config discovery helpers for ancestor-walk (CLI) and tree-walk (LSP) in config_loader.rs.
  • Updated LSP nested-config discovery to use discover_configs_in_tree.
  • Updated CLI nested-config discovery to use discover_configs_in_ancestors and improved the build-error message to include the config path.

Reviewed changes

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

File Description
apps/oxlint/src/lsp/server_linter.rs Switches LSP nested config discovery to the shared tree-walk helper.
apps/oxlint/src/lint.rs Replaces inline ancestor-walk config discovery with shared helper; improves config build error output.
apps/oxlint/src/config_loader.rs Introduces shared config discovery functions (ancestor + tree) alongside existing config loading logic.

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

@camc314 camc314 force-pushed the c/01-28-refactor_linter_share_config_loading_logic_between_lsp_cli branch from 9392bdd to fff2a9f Compare January 28, 2026 19:51
@camc314 camc314 force-pushed the c/01-28-refactor_linter_extract_config_searching_functions_to_their_own_file branch from e11cb0f to 1e332c9 Compare January 28, 2026 19:51
@graphite-app graphite-app bot changed the base branch from c/01-28-refactor_linter_share_config_loading_logic_between_lsp_cli to graphite-base/18673 January 29, 2026 09:21
@graphite-app graphite-app bot force-pushed the graphite-base/18673 branch from fff2a9f to a88ed23 Compare January 29, 2026 09:29
@graphite-app graphite-app bot force-pushed the c/01-28-refactor_linter_extract_config_searching_functions_to_their_own_file branch from 1e332c9 to 3089a77 Compare January 29, 2026 09:29
@graphite-app graphite-app bot changed the base branch from graphite-base/18673 to main January 29, 2026 09:29
@graphite-app graphite-app bot force-pushed the c/01-28-refactor_linter_extract_config_searching_functions_to_their_own_file branch from 3089a77 to 31aada2 Compare January 29, 2026 09:30
@camc314 camc314 added the 0-merge Merge with Graphite Merge Queue label Jan 29, 2026
Copy link
Contributor Author

camc314 commented Jan 29, 2026

Merge activity

#18673)

move the funcitons that search for config files out of sever_linter.rs/lint.rs into config_loader so that they're all in the same place
@graphite-app graphite-app bot force-pushed the c/01-28-refactor_linter_extract_config_searching_functions_to_their_own_file branch from 31aada2 to 5b11610 Compare January 29, 2026 14:36
@graphite-app graphite-app bot merged commit 5b11610 into main Jan 29, 2026
20 checks passed
@graphite-app graphite-app bot deleted the c/01-28-refactor_linter_extract_config_searching_functions_to_their_own_file branch January 29, 2026 14:42
@graphite-app graphite-app bot removed the 0-merge Merge with Graphite Merge Queue label Jan 29, 2026
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 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