refactor(oxfmt): Update .editorconfig overrides logic to prepare for oxfmtrc overrides#18064
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. |
.editorconfig overrides logic to prepare for oxfmtrc overrides
There was a problem hiding this comment.
Pull request overview
This PR refactors the configuration logic to prepare for oxfmtrc overrides functionality. The main refactoring moves the conversion logic from Oxfmtrc::into_options() to FormatConfig::into_oxfmt_options(), and introduces a new merge() method for future override support.
Changes:
- Moved format configuration conversion logic from
Oxfmtrcimpl toFormatConfigimpl - Added
FormatConfig::merge()method andjson_merge()helper for future override support - Renamed
resolve_with_overrides()toresolve_with_editorconfig_overrides()for clarity - Updated all call sites and tests to use the new API
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| apps/oxfmt/src/core/oxfmtrc.rs | Added TODO comment, implemented FormatConfig::merge() and into_oxfmt_options(), added json_merge() helper, removed Oxfmtrc::into_options(), updated all tests |
| apps/oxfmt/src/core/config.rs | Updated imports, refactored build_and_validate() to use new API, renamed method for clarity, updated apply_editorconfig() to work with FormatConfig, improved documentation |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
0dd6ef8 to
56eb9f2
Compare
f426209 to
8166c80
Compare
Merge activity
|
8166c80 to
a71fa08
Compare

Part of #17585
FormatConfig::merge()will be used later.