fix(linter): handle errors from tsgolint#13252
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. |
There was a problem hiding this comment.
Pull Request Overview
This PR fixes error handling for the tsgolint integration by properly parsing and propagating errors from the tsgolint process instead of silently failing.
- Distinguishes between diagnostic messages and error messages from tsgolint
- Propagates tsgolint errors back to the caller with proper error messages
- Improves error reporting when tsgolint process exits with non-zero status
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
CodSpeed Instrumentation Performance ReportMerging #13252 will not alter performanceComparing Summary
Footnotes |
43ffbfc to
183eab6
Compare
Merge activity
|
4b01458 to
7cc6812
Compare
7cc6812 to
55f4ea6
Compare
67dada7 to
e5a5eb3
Compare
Previously this would fail silently, with an error like: ``` [crates/oxc_linter/src/tsgolint.rs:222:41] e = "Failed to parse tsgolint payload: missing field `range` at line 1 column 39" ``` ``` hidden. this PR fixes parsing of diagnostics vs errors (errors have a diff shape -> https://github.com/oxc-project/tsgolint/blob/2d1be8afeb6446230480b8f9e6311fcf2882c287/cmd/tsgolint/headless.go#L84-L86) this PR propogates the error back up correctly After: ``` $ OXLINT_TSGOLINT_PATH=../../../../../../oxc-project/tsgolint/tsgolint ../../../../target/debug/oxlint --type-aware -D no-floating-promises ^[Error running tsgolint: "tsgolint process exited with status: exit status: 1, error: no files specified in config"% ```
e5a5eb3 to
5091ccd
Compare
Previously this would fail silently, with an error like: ``` [crates/oxc_linter/src/tsgolint.rs:222:41] e = "Failed to parse tsgolint payload: missing field `range` at line 1 column 39" ``` ``` hidden. this PR fixes parsing of diagnostics vs errors (errors have a diff shape -> https://github.com/oxc-project/tsgolint/blob/2d1be8afeb6446230480b8f9e6311fcf2882c287/cmd/tsgolint/headless.go#L84-L86) this PR propogates the error back up correctly After: ``` $ OXLINT_TSGOLINT_PATH=../../../../../../oxc-project/tsgolint/tsgolint ../../../../target/debug/oxlint --type-aware -D no-floating-promises ^[Error running tsgolint: "tsgolint process exited with status: exit status: 1, error: no files specified in config"% ```
5091ccd to
3c34767
Compare

Previously this would fail silently, with an error like:
$ OXLINT_TSGOLINT_PATH=../../../../../../oxc-project/tsgolint/tsgolint ../../../../target/debug/oxlint --type-aware -D no-floating-promises
^[Error running tsgolint: "tsgolint process exited with status: exit status: 1, error: no files specified in config"%