-
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
build: update linter #489
build: update linter #489
Conversation
@@ -1,6 +1,6 @@ | |||
module github.com/decred/vspd/client/v4 | |||
|
|||
go 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.
Why is this bumped? Nothing requires it.
@@ -1,6 +1,6 @@ | |||
module github.com/decred/vspd | |||
|
|||
go 1.20 |
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.
Same. No reason to bump this.
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.
copyloopvar requires it.
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.
It doesn't seem very prudent to me to require a new version of Go for all consumers just to add a linter.
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.
Agree with @davecgh here, leave the go.mod files as they are and the linter will just output a warning rather than causing a build failure:
==> lint types
WARN [linters_context] copyloopvar: this linter is disabled because the Go version (1.19) of your project is lower than Go 1.22
We can live with the warning for now and I will add this as a note to #488
- fatcontext | ||
- goconst | ||
- godot | ||
- gofmt | ||
- goimports | ||
- gosimple | ||
- govet | ||
- grouper |
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.
The default config for grouper
has all functionality disabled, which means just adding it to this list does nothing.
Besides that, I don't agree with the premise of this linter. Why should it be forced that only singles or groups of declarations can be used? In some cases a single makes sense (example), and in other cases its helpful to group related values together (example).
@@ -32,6 +33,8 @@ linters: | |||
- predeclared | |||
- reassign | |||
- revive | |||
- rowserrcheck |
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.
This project doesn't use SQL so these two linters are unnecessary.
@@ -1,6 +1,6 @@ | |||
module github.com/decred/vspd | |||
|
|||
go 1.20 |
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.
Agree with @davecgh here, leave the go.mod files as they are and the linter will just output a warning rather than causing a build failure:
==> lint types
WARN [linters_context] copyloopvar: this linter is disabled because the Go version (1.19) of your project is lower than Go 1.22
We can live with the warning for now and I will add this as a note to #488
No description provided.