fix(oxfmt): Resolve .editorconfig root dir from cwd#17093
fix(oxfmt): Resolve .editorconfig root dir from cwd#17093graphite-app[bot] merged 1 commit intomainfrom
.editorconfig root dir from cwd#17093Conversation
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. |
There was a problem hiding this comment.
Pull request overview
This PR fixes the editorconfig resolution to properly resolve the root directory from the current working directory (cwd). Previously, the editorconfig parser did not receive the cwd context, which prevented per-file overrides from working correctly.
- Adds
cwdparameter toConfigResolver::from_config_paths()method - Passes
cwdtoEditorConfig::parse().with_cwd()for proper path resolution - Enables previously skipped test for per-file editorconfig overrides
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
apps/oxfmt/src/core/config.rs |
Adds cwd parameter to from_config_paths() and passes it to EditorConfig::parse().with_cwd() |
apps/oxfmt/src/cli/format.rs |
Updates call site to pass &cwd parameter |
apps/oxfmt/src/stdin/mod.rs |
Updates call site to pass &cwd parameter |
apps/oxfmt/test/editorconfig.test.ts |
Enables previously skipped test and updates expected behavior comments |
apps/oxfmt/test/fixtures/editorconfig/per_file_override/.editorconfig |
Updates fixture to use indent_style = tab for better demonstration of per-file overrides |
apps/oxfmt/test/__snapshots__/editorconfig.test.ts.snap |
Adds snapshot for the now-enabled per-file override test case |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
.editorconfig root dir from cwd
Merge activity
|
Follow up #17044 - Set `cwd` to `EditorConfig` to handle absolute path - Restore skipped tests
e184ad6 to
f045903
Compare
Follow up #17044 - Set `cwd` to `EditorConfig` to handle absolute path - Restore skipped tests
f045903 to
cdb80d4
Compare

Follow up #17044
cwdtoEditorConfigto handle absolute path