golangci-lint
golangci-lint copied to clipboard
staticcheck randomly fails on CI
- [x] Yes, I'm using a binary release within 2 latest major releases. Only such installations are supported.
- [x] Yes, I've searched similar issues on GitHub and didn't find any.
- [x] Yes, I've included all information below (version, config, etc).
- [ ] Yes, I've tried with the standalone linter if available. (https://golangci-lint.run/usage/linters/)
=== CONT TestSourcesFromTestdataWithIssuesDir/staticcheck.go
linters_test.go:157: [run --allow-parallel-runners --disable-all --print-issued-lines=false --out-format=line-number --max-same-issues=100 -Estaticcheck --no-config testdata/staticcheck.go]
linters_test.go:37:
Error Trace: linters_test.go:37
linters_test.go:158
linters_test.go:57
Error: Received unexpected error:
unmatched errors
level=warning msg="[linters context/goanalysis] Failed to get persisted facts: failed to get data from low-level cache by key fact_deprecated/facts for package fmtsort: read 0/175 bytes from /home/runner/.cache/golangci-lint/ed/ed3eaffb7621d0470f01c721ca356e360b48c69fbe6c0adf4fedb7c1b1c4f83f-a with error EOF"
Test: TestSourcesFromTestdataWithIssuesDir/staticcheck.go
...
--- FAIL: TestSourcesFromTestdataWithIssuesDir (0.00s)
--- FAIL: TestSourcesFromTestdataWithIssuesDir/staticcheck.go (3.47s)
Another case:
=== CONT TestSourcesFromTestdataWithIssuesDir/staticcheck.go
linters_test.go:36:
Error Trace: linters_test.go:36
linters_test.go:157
linters_test.go:56
Error: Received unexpected error:
staticcheck.go:26: missing error "SA1019: runtime.CPUProfile has been deprecated .*"
Test: TestSourcesFromTestdataWithIssuesDir/staticcheck.go
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
most recent
- https://github.com/golangci/golangci-lint/runs/6253254323?check_suite_focus=true
- https://github.com/golangci/golangci-lint/runs/6253260233?check_suite_focus=true
=== CONT TestSourcesFromTestdataWithIssuesDir/staticcheck.go
linters_test.go:237: [run --go=1.17 --allow-parallel-runners --disable-all --print-issued-lines=false --out-format=line-number --max-same-issues=100 -Estaticcheck --no-config testdata/staticcheck.go]
linters_test.go:40:
Error Trace: linters_test.go:40
linters_test.go:238
linters_test.go:60
Error: Received unexpected error:
unmatched errors
level=warning msg="[linters context/goanalysis] Failed to get persisted facts: failed to get data from low-level cache by key buildir/facts for package goarch: read 0/175 bytes from /Users/runner/Library/Caches/golangci-lint/da/dadbfe6a926e3ee11aab7c7363f1942b1b998f4d95d49f082731b2408a94e59e-a with error EOF"
Test: TestSourcesFromTestdataWithIssuesDir/staticcheck.go
folks, what do you think if I exclude go tests from "docs" changes? e.g.
- https://github.com/golangci/golangci-lint/pull/2803
- https://github.com/golangci/golangci-lint/pull/2802
- https://github.com/golangci/golangci-lint/pull/2798
fails because this issue. it's possible by adding "paths" directive for GitHub actions.
I fixed the flaky