Skip to content

fix(linter): Improve the error message for when the oxlint config file is invalid.#17196

Merged
graphite-app[bot] merged 1 commit intomainfrom
improve-err-msg
Dec 21, 2025
Merged

fix(linter): Improve the error message for when the oxlint config file is invalid.#17196
graphite-app[bot] merged 1 commit intomainfrom
improve-err-msg

Conversation

@connorshea
Copy link
Member

It'd be better if the path of the specific invalid config were printed when this happened, in case I'm using nested configs, but for now this improves things a bit, at least.

Copilot AI review requested due to automatic review settings December 21, 2025 00:37
@connorshea connorshea requested a review from camc314 as a code owner December 21, 2025 00:37
@github-actions github-actions bot added A-linter Area - Linter A-cli Area - CLI A-linter-plugins Area - Linter JS plugins C-bug Category - Bug labels Dec 21, 2025
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 improves the error message clarity when oxlint configuration file parsing fails by changing the generic message "Failed to parse configuration file." to the more specific "Failed to parse oxlint configuration file."

  • Updated error message in three locations in lint.rs where configuration parsing errors are reported
  • Updated all corresponding test snapshots to reflect the new error message format

Reviewed changes

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

Show a summary per file
File Description
apps/oxlint/src/lint.rs Updated error message in three error handling blocks to specify "oxlint configuration file" instead of generic "configuration file"
apps/oxlint/test/fixtures/plugin_name_reserved/output.snap.md Updated test snapshot to match new error message
apps/oxlint/test/fixtures/plugin_name_missing2/output.snap.md Updated test snapshot to match new error message
apps/oxlint/test/fixtures/plugin_name_missing/output.snap.md Updated test snapshot to match new error message
apps/oxlint/test/fixtures/plugin_name_alias_reserved/output.snap.md Updated test snapshot to match new error message
apps/oxlint/test/fixtures/plugin_name_alias_invalid/output.snap.md Updated test snapshot to match new error message
apps/oxlint/test/fixtures/missing_rule/output.snap.md Updated test snapshot to match new error message
apps/oxlint/test/fixtures/missing_plugin/output.snap.md Updated test snapshot to match new error message
apps/oxlint/test/fixtures/lint_createOnce_error/output.snap.md Updated test snapshot to match new error message
apps/oxlint/test/fixtures/import_error/output.snap.md Updated test snapshot to match new error message
apps/oxlint/src/snapshots/fixtures__auto_config_parse_error_debugger.js@oxlint.snap Updated test snapshot to match new error message

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

@camc314 camc314 added the 0-merge Merge with Graphite Merge Queue label Dec 21, 2025
@camc314 camc314 self-assigned this Dec 21, 2025
Copy link
Contributor

camc314 commented Dec 21, 2025

Merge activity

…e is invalid. (#17196)

It'd be better if the path of the specific invalid config were printed when this happened, in case I'm using nested configs, but for now this improves things a bit, at least.
@graphite-app graphite-app bot merged commit 376caf1 into main Dec 21, 2025
18 checks passed
@graphite-app graphite-app bot deleted the improve-err-msg branch December 21, 2025 13:47
@graphite-app graphite-app bot removed the 0-merge Merge with Graphite Merge Queue label Dec 21, 2025
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 A-linter-plugins Area - Linter JS plugins C-bug Category - Bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants