Skip to content

Comments

fix(linter): handle errors from tsgolint#13252

Merged
graphite-app[bot] merged 1 commit intomainfrom
c/08-21-fix_linter_handle_errors_from_tsgolint
Aug 27, 2025
Merged

fix(linter): handle errors from tsgolint#13252
graphite-app[bot] merged 1 commit intomainfrom
c/08-21-fix_linter_handle_errors_from_tsgolint

Conversation

@camc314
Copy link
Contributor

@camc314 camc314 commented Aug 21, 2025

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"%

Copy link
Contributor Author

camc314 commented Aug 21, 2025


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 hot fixes, skip the queue and merge this PR next

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 August 21, 2025 17:11
Copilot AI review requested due to automatic review settings August 21, 2025 17:11
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 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-hq
Copy link

codspeed-hq bot commented Aug 21, 2025

CodSpeed Instrumentation Performance Report

Merging #13252 will not alter performance

Comparing c/08-21-fix_linter_handle_errors_from_tsgolint (3c34767) with main (902b39b)1

Summary

✅ 34 untouched benchmarks

Footnotes

  1. No successful run was found on main (3c34767) during the generation of this report, so 902b39b was used instead as the comparison base. There might be some changes unrelated to this pull request in this report.

@github-actions github-actions bot added A-linter Area - Linter C-bug Category - Bug labels Aug 21, 2025
@camc314 camc314 force-pushed the c/08-21-fix_linter_handle_errors_from_tsgolint branch from 43ffbfc to 183eab6 Compare August 21, 2025 17:35
@camc314 camc314 added the 0-merge Merge with Graphite Merge Queue label Aug 22, 2025
Copy link
Contributor Author

camc314 commented Aug 22, 2025

Merge activity

  • Aug 22, 9:17 AM UTC: The merge label '0-merge' was detected. This PR will be added to the Graphite merge queue once it meets the requirements.
  • Aug 22, 9:28 AM UTC: This pull request can not be added to the Graphite merge queue. Please try rebasing and resubmitting to merge when ready.
  • Aug 22, 9:28 AM UTC: Graphite disabled "merge when ready" on this PR due to: a merge conflict with the target branch; resolve the conflict and try again..
  • Aug 22, 9:28 AM UTC: The merge label '0-merge' was detected. This PR will be added to the Graphite merge queue once it meets the requirements.
  • Aug 26, 1:07 PM UTC: camc314 added this pull request to the Graphite merge queue.
  • Aug 26, 1:08 PM UTC: The Graphite merge queue couldn't merge this PR because it was not satisfying all requirements (Failed CI: 'Test Linux').
  • Aug 27, 9:45 PM UTC: The merge label '0-merge' was detected. This PR will be added to the Graphite merge queue once it meets the requirements.
  • Aug 27, 9:45 PM UTC: camc314 added this pull request to the Graphite merge queue.
  • Aug 27, 9:56 PM UTC: Merged by the Graphite merge queue.

@camc314 camc314 force-pushed the c/08-21-fix_linter_handle_errors_from_tsgolint branch 2 times, most recently from 4b01458 to 7cc6812 Compare August 22, 2025 09:23
@camc314 camc314 force-pushed the c/08-21-fix_linter_handle_errors_from_tsgolint branch from 7cc6812 to 55f4ea6 Compare August 22, 2025 09:28
Boshen
Boshen previously requested changes Aug 26, 2025
Copy link
Member

@Boshen Boshen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Needs a rebase.

@camc314 camc314 force-pushed the c/08-21-fix_linter_handle_errors_from_tsgolint branch 3 times, most recently from 67dada7 to e5a5eb3 Compare August 26, 2025 12:58
graphite-app bot pushed a commit that referenced this pull request Aug 26, 2025
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"%
```
@graphite-app graphite-app bot force-pushed the c/08-21-fix_linter_handle_errors_from_tsgolint branch from e5a5eb3 to 5091ccd Compare August 26, 2025 13:07
@graphite-app graphite-app bot removed the 0-merge Merge with Graphite Merge Queue label Aug 26, 2025
@camc314 camc314 added the 0-merge Merge with Graphite Merge Queue label Aug 27, 2025
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"%
```
@graphite-app graphite-app bot force-pushed the c/08-21-fix_linter_handle_errors_from_tsgolint branch from 5091ccd to 3c34767 Compare August 27, 2025 21:53
@graphite-app graphite-app bot merged commit 3c34767 into main Aug 27, 2025
24 checks passed
@graphite-app graphite-app bot deleted the c/08-21-fix_linter_handle_errors_from_tsgolint branch August 27, 2025 21:56
@graphite-app graphite-app bot removed the 0-merge Merge with Graphite Merge Queue label Aug 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-linter Area - Linter C-bug Category - Bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants