Skip to content

refactor(linter): introduce ConfigConflict struct for conflicting config files#21635

Merged
graphite-app[bot] merged 1 commit intomainfrom
c/04-22-refactor_linter_introduce_configconflict_struct_for_conflicting_config_files
Apr 22, 2026
Merged

refactor(linter): introduce ConfigConflict struct for conflicting config files#21635
graphite-app[bot] merged 1 commit intomainfrom
c/04-22-refactor_linter_introduce_configconflict_struct_for_conflicting_config_files

Conversation

@camc314
Copy link
Copy Markdown
Contributor

@camc314 camc314 commented Apr 22, 2026

No description provided.

Copy link
Copy Markdown
Contributor Author

camc314 commented Apr 22, 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 changes, fast-track this PR to the front of 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.

@camc314 camc314 marked this pull request as ready for review April 22, 2026 09:19
Copilot AI review requested due to automatic review settings April 22, 2026 09:19
@camc314 camc314 self-assigned this Apr 22, 2026
Copy link
Copy Markdown
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-loading error reporting by introducing a ConfigConflict struct to represent and convert conflicting config-file discoveries into a single user-facing diagnostic.

Changes:

  • Added ConfigConflict (and From<ConfigConflict> for OxcDiagnostic) in config_discovery.rs.
  • Updated ConfigLoader to construct ConfigConflict instead of calling the removed config_conflict_diagnostic helper.
  • Removed the old conflict diagnostic formatting function from config_loader.rs.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.

File Description
apps/oxlint/src/config_loader.rs Constructs ConfigConflict on multi-config discovery; removes inline diagnostic helper.
apps/oxlint/src/config_discovery.rs Adds ConfigConflict struct + diagnostic conversion and shared conflict-name formatting.

Comment thread apps/oxlint/src/config_loader.rs Outdated
Comment thread apps/oxlint/src/config_discovery.rs
Comment thread apps/oxlint/src/config_loader.rs Outdated
@graphite-app graphite-app Bot force-pushed the c/04-22-refactor_oxlint_split_discoveredconfigfile_into_it_s_own_module branch 2 times, most recently from 04bbb33 to ad793d9 Compare April 22, 2026 09:32
@graphite-app graphite-app Bot force-pushed the c/04-22-refactor_linter_introduce_configconflict_struct_for_conflicting_config_files branch from a2b9445 to 74014cc Compare April 22, 2026 09:32
@graphite-app graphite-app Bot changed the base branch from c/04-22-refactor_oxlint_split_discoveredconfigfile_into_it_s_own_module to graphite-base/21635 April 22, 2026 09:44
@camc314 camc314 force-pushed the c/04-22-refactor_linter_introduce_configconflict_struct_for_conflicting_config_files branch from 74014cc to e9bda23 Compare April 22, 2026 09:45
@camc314 camc314 force-pushed the graphite-base/21635 branch from ad793d9 to feaf85c Compare April 22, 2026 09:45
@camc314 camc314 changed the base branch from graphite-base/21635 to c/04-22-refactor_oxlint_split_discoveredconfigfile_into_it_s_own_module April 22, 2026 09:45
@camc314 camc314 requested a review from Copilot April 22, 2026 09:46
Copy link
Copy Markdown
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 configuration conflict diagnostics by introducing a dedicated ConfigConflict type in config discovery and reusing it from the config loader to report “multiple config files in one directory” errors consistently.

Changes:

  • Added ConfigConflict struct + From<ConfigConflict> for OxcDiagnostic conversion in config discovery.
  • Updated config loading paths to collect conflicting DiscoveredConfigFiles and emit the new conflict diagnostic.
  • Removed the legacy config_conflict_diagnostic helper from config_loader.rs.

Reviewed changes

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

File Description
apps/oxlint/src/config_loader.rs Switches conflict detection to build a ConfigConflict from discovered paths and converts it into an OxcDiagnostic.
apps/oxlint/src/config_discovery.rs Introduces ConfigConflict and centralized formatting of conflict diagnostics.

Comment thread apps/oxlint/src/config_discovery.rs
Comment thread apps/oxlint/src/config_discovery.rs
Base automatically changed from c/04-22-refactor_oxlint_split_discoveredconfigfile_into_it_s_own_module to main April 22, 2026 09:55
@camc314 camc314 added the 0-merge Merge with Graphite Merge Queue label Apr 22, 2026
@camc314 camc314 force-pushed the c/04-22-refactor_linter_introduce_configconflict_struct_for_conflicting_config_files branch from e9bda23 to 921af18 Compare April 22, 2026 10:28
Copy link
Copy Markdown
Contributor Author

camc314 commented Apr 22, 2026

Merge activity

@graphite-app graphite-app Bot force-pushed the c/04-22-refactor_linter_introduce_configconflict_struct_for_conflicting_config_files branch from 921af18 to be46a91 Compare April 22, 2026 10:37
@graphite-app graphite-app Bot merged commit be46a91 into main Apr 22, 2026
25 checks passed
@graphite-app graphite-app Bot deleted the c/04-22-refactor_linter_introduce_configconflict_struct_for_conflicting_config_files branch April 22, 2026 10:41
@graphite-app graphite-app Bot removed the 0-merge Merge with Graphite Merge Queue label Apr 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants