-
Notifications
You must be signed in to change notification settings - Fork 21
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
Use golangci-lint instead of golint #68
Conversation
b84262d
to
5ec728a
Compare
.golangci.yml
Outdated
linters-settings: | ||
staticcheck: | ||
# Select the Go version to target. The default is '1.13'. | ||
go: "1.18" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't we run on 1.19?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
go-spacemesh is still using 1.18.
the guiding principal (prior to me joining) is that there should be a good reason (feature we want to use) to upgrade go version. but i don't really feel too strongly.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
post breaks on windows when I try to use 1.18. I will update this config to use 1.19 instead.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I created a PR to also update go-spacemesh
to use Go 1.19: spacemeshos/go-spacemesh#3650
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@countvonzero my point was that in a lot of other places here 1.19 was used ;)
@@ -1,7 +1,7 @@ | |||
name: CI | |||
|
|||
env: | |||
go-version: '1.19' | |||
go-version: "1.19" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
but why is this 1.19?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tried 1.18. Using it breaks the Windows tests with the following errors:
ThreadSanitizer failed to allocate 0x000000959000 (9801728) bytes at 0x200d8fbb54000 (error code: 87)
See e.g. here: https://github.com/spacemeshos/post/actions/runs/3236096321/jobs/5301430586 with 1.19 this does not happen. I don't know if this is a go 1.18 issue or caused by the GCC that is used by Github. See also golang/go#46099
6605c0b
to
b540939
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm ok with that with the condition that spacemeshos/go-spacemesh#3650 is also ok/merged.
golint
has been deprecated for a while. In https://github.com/spacemeshos/go-spacemesh we already migrated togolangci-lint
instead.This PR updates
post
to also usegolangci-lint
and fixes all complaints thatgolangci-lint
has.