Skip to content

fix(go): preserve test and vet diagnostics - #2284

Open
jsiu93 wants to merge 2 commits into
rtk-ai:developfrom
jsiu93:fix/go-filter-exit-fallback
Open

jsiu93 wants to merge 2 commits into
rtk-ai:developfrom
jsiu93:fix/go-filter-exit-fallback

Conversation

@jsiu93

@jsiu93 jsiu93 commented Jun 5, 2026

Copy link
Copy Markdown
Contributor

Closes #2281.

Summary

  • Route rtk go test and rtk go vet through exit-aware filtering so non-zero Go failures cannot be summarized as empty results.
  • Preserve real Go diagnostics such as undefined, cannot, and import cycle from raw output and go test -json output events.
  • Share Go diagnostic formatting across build/test/vet and strip ANSI before matching.

Test plan

  • cargo fmt --all -- --check
  • cargo clippy --all-targets
  • cargo test --all --quiet
  • Manual repro: rtk go test ./... and rtk go vet ./... in a temporary Go project with undefined: missingSymbol

@rtk-release-bot

Copy link
Copy Markdown
Contributor

This pull request has been automatically marked as stale due to 90 days of inactivity. If this pull request is still relevant, please leave any comment (for example, "bump"), and we'll keep it open. Your contribution is very much appreciated — we're sorry we haven't been able to review it yet.

@jsiu93

jsiu93 commented Sep 14, 2026

Copy link
Copy Markdown
Contributor Author

bump. #2281 is still open. Note: #3577 covers the exit-code side for go test / go vet via the generic guard_exit; this PR additionally extracts compiler diagnostics from go test -json events. I'll rebase or narrow this to the diagnostics part once #3577 is decided.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

rtk go / Go filters can hide real compiler errors and report misleading success

1 participant