Skip to content
New issue

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

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

Already on GitHub? # to your account

Staticcheck v0.3.0 fails to validate itself #1237

Closed
lootek opened this issue Mar 30, 2022 · 2 comments
Closed

Staticcheck v0.3.0 fails to validate itself #1237

lootek opened this issue Mar 30, 2022 · 2 comments

Comments

@lootek
Copy link

lootek commented Mar 30, 2022

~/projects/src/honnef.co/go/tools [master] $ staticcheck ./...
internal/robustio/robustio_flaky.go:68:23: error should be returned as the last argument (ST1008)
internal/robustio/robustio_flaky.go:77:23: error should be returned as the last argument (ST1008)
internal/robustio/robustio_flaky.go:89:23: error should be returned as the last argument (ST1008)
go/ir/builder.go:36:2: //go:build comment without // +build comment (compile)
~/projects/src/honnef.co/go/tools [master] $ git log -n 1
commit c8d2d1b07f1874f4f3e1478056e3fa107e4b03eb (HEAD -> master, origin/master, origin/HEAD)
Author: Dominik Honnef <dominik@honnef.co>
Date:   Wed Mar 30 05:24:12 2022 +0200

    website: move list of copyrights to external file
  • The output of 'staticcheck -version'
staticcheck 2021.1.2 (v0.2.2)
  • The output of 'staticcheck -debug.version' (it is fine if this command fails)
staticcheck 2021.1.2 (v0.2.2)

Compiled with Go version: go1.16.10
Main module:
	honnef.co/go/tools@v0.2.2 (sum: h1:MNh1AVMyVX23VUHE2O27jm6lNj3vjO5DexS4A1xvnzk=)
Dependencies:
	github.com/BurntSushi/toml@v0.3.1 (sum: h1:WXkYYl6Yr3qBf1K79EBnL4mak0OimBfB0XUf9Vl28OQ=)
	golang.org/x/mod@v0.5.1 (sum: h1:OJxoQ/rynoF0dcCdI7cLPktw/hR2cueqYfjm43oqK38=)
	golang.org/x/sys@v0.0.0-20220111092808-5a964db01320 (sum: h1:0jf+tOCoZ3LyutmCOWpVni1chK4VfFLhRsDK7MhqGRY=)
	golang.org/x/tools@v0.1.8 (sum: h1:P1HhGGuLW4aAclzjtmJdf0mJOjVUZUzOTqkAkWL+l6w=)
	golang.org/x/xerrors@v0.0.0-20200804184101-5ec99f83aff1 (sum: h1:go1bK/D/BFZV2I8cIQd1NKEZ+0owSTG1fDTci4IqFcE=)
  • The output of 'go version'
go version go1.16.10 darwin/amd64
@lootek lootek added bug needs-triage Newly filed issue that needs triage labels Mar 30, 2022
@dominikh
Copy link
Owner

dominikh commented Mar 30, 2022

Staticcheck v0.3.0 fails to validate itself

You are using v0.2.2, not v0.3.0

internal/robustio/robustio_flaky.go

None of these trigger with v0.3.0 thanks to 274e0ee.

go/ir/builder.go:36:2: //go:build comment without // +build comment (compile)

That's from Go itself, and irrelevant, since only versions up to 1.16 will complain about that, and we only support the last two versions, currently 1.17 and 1.18.

At any rate, we have CI set up, and the actual failures are shown at https://github.com/dominikh/go-tools/actions/runs/2062419574 – of which the Go 1.17 specific issues (SA4008) are #1231 and the remaining issue is some unused code we'll remove in a future change.

I am going to close this issue as this is already tracked by CI.

@dominikh dominikh removed bug needs-triage Newly filed issue that needs triage labels Mar 30, 2022
@lootek
Copy link
Author

lootek commented Mar 30, 2022

Yeah, I should've named this issue "Staticcheck v0.2.2 fails to validate itself in v0.3.0"

Anyway, thanks for the explanation 👍

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants