Skip to content
This repository has been archived by the owner on Aug 29, 2023. It is now read-only.

run staticcheck #6

Closed
marten-seemann opened this issue Jan 13, 2021 · 4 comments · Fixed by #22
Closed

run staticcheck #6

marten-seemann opened this issue Jan 13, 2021 · 4 comments · Fixed by #22

Comments

@marten-seemann
Copy link
Contributor

See ipld/ipld#92.

@marten-seemann
Copy link
Contributor Author

Interestingly, it looks like staticcheck integration in golangci-lint is broken: golangci/golangci-lint#1649.

@marten-seemann
Copy link
Contributor Author

marten-seemann commented Mar 4, 2021

We should use the real staticcheck, not the one bundled with golangci-lint.

Unfortunately, that one doesn't give us proper annotations: dominikh/go-tools#910.
The was submitted a long time ago in actions/setup-go#98, but it looks like nobody in the GitHub team seems to care.

@mvdan Any suggestions how to move forward with this? Should we use https://github.com/WillAbides/setup-go-faster? Unfortunately, that would be another 3rd-party dependency.

@mvdan
Copy link
Contributor

mvdan commented Mar 4, 2021

I have a friend who is an engineer on the Actions team, I've pinged him about this whole situation in the hopes that he can reach the right person. Let's wait a week and hopefully it gets resolved by then.

If we're still here in a week, maybe we can run staticcheck's output via a simple sed script to make its output match what setup-go expects. This is roughly what we'd gain with golangci-lint, and it brings its own downsides, so I think a sed line should be better. I don't think we want to encourage others to use a third-party setup-go action just yet.

@marten-seemann
Copy link
Contributor Author

FWIW, I tried out setup-go-faster in my demo repo, and it seems to work: https://github.com/marten-seemann-test/target/blob/master/.github/workflows/go-check.yml

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
No open projects
Status: Done
Development

Successfully merging a pull request may close this issue.

2 participants