Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Packages with no tests are included in Package summary in go1.22,1.23 #126

Open
Tracked by #109
mfridman opened this issue Sep 5, 2024 · 1 comment
Open
Tracked by #109

Comments

@mfridman
Copy link
Owner

mfridman commented Sep 5, 2024

For example:

go test -race -count=1 ./internal/... -json -cover | go run main.go -trimpath=auto
┌────────────────────────────────────────────────────────────┐
│  STATUS │ ELAPSED │ PACKAGE │ COVER  │ PASS │ FAIL │ SKIP  │
│─────────┼─────────┼─────────┼────────┼──────┼──────┼───────│
│  PASS   │  0.00s  │ /app    │  0.0%  │  0   │  0   │  0    │
│  PASS   │  0.01s  │ /check  │  0.0%  │  0   │  0   │  0    │
│  PASS   │  1.36s  │ /utils  │ 100.0% │  8   │  0   │  0    │
└────────────────────────────────────────────────────────────┘

I'd expect /app and /check to be omitted by default unless -notests flag is supplied. This might be related to #106

@mfridman mfridman changed the title Packages with no tests are included in Package summary in go1.23 Packages with no tests are included in Package summary in go1.22,1.23 Sep 5, 2024
This was referenced Sep 5, 2024
@BrunoKrugel
Copy link

I fixed this running my tests with the flag nocoverageredesign:

GOEXPERIMENT=nocoverageredesign go test-json -cover ./... | tparse -all -pass

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

No branches or pull requests

2 participants