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

Cannot run make lint command doing the setup #572

Open
MCarlomagno opened this issue Oct 4, 2023 · 2 comments
Open

Cannot run make lint command doing the setup #572

MCarlomagno opened this issue Oct 4, 2023 · 2 comments

Comments

@MCarlomagno
Copy link
Contributor

MCarlomagno commented Oct 4, 2023

Description

I'm doing the setup following the CONTRIBUTING.md file and when I run make lint, throws the following error in staticcheck step :

-: cannot import "github.com/cockroachdb/pebble/internal/rawalloc" (unknown bexport format version -1 ("...")), possibly version skew - reinstall package (compile)
-: cannot import "math/bits" (unknown bexport format version -1 ("...")), possibly version skew - reinstall package (compile)

I did some research on my own but couln't find the root cause of the issue, I wonder if someone else experienced this issue before.

$ go version
go version go1.20.8 darwin/arm64
@MCarlomagno
Copy link
Contributor Author

Update

Based on the answer from this issue, It seems that staticcheck version must be ahead Go version to work properly, so for:

$ go version
go version go1.20.8 darwin/arm64

I had to upgrade staticcheck by running

go install honnef.co/go/tools/cmd/staticcheck@v0.4.0

And that fixed the issue

@MCarlomagno
Copy link
Contributor Author

Update n2

After fixing the staticcheck version, now the following command throws error

$ golangci-lint run
ERRO Running error: unknown linters: 'musttag', run 'golangci-lint help linters' to see the list of supported linters 

The solution was to upgrade golangci-lint to 1.51, by the release notes, they include musttag in this version:

$ go install github.com/golangci/golangci-lint/cmd/golangci-lint@v1.51.0

And voilà 🙂 make lint works

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

1 participant