-
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,20 +7,21 @@ linters: | |
- asciicheck | ||
- bidichk | ||
- containedctx | ||
- copyloopvar | ||
- dupword | ||
- durationcheck | ||
- errcheck | ||
- errchkjson | ||
- errorlint | ||
- exhaustive | ||
- exportloopref | ||
- fatcontext | ||
- goconst | ||
- godot | ||
- gofmt | ||
- goimports | ||
- gosimple | ||
- govet | ||
- grouper | ||
- ineffassign | ||
- makezero | ||
- mirror | ||
|
@@ -32,6 +33,8 @@ linters: | |
- predeclared | ||
- reassign | ||
- revive | ||
- rowserrcheck | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This project doesn't use SQL so these two linters are unnecessary. |
||
- sqlclosecheck | ||
- staticcheck | ||
- tparallel | ||
- typecheck | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 commentThe reason will be displayed to describe this comment to others. Learn more. Why is this bumped? Nothing requires it. |
||
go 1.22 | ||
|
||
require ( | ||
github.com/decred/dcrd/txscript/v4 v4.1.1 | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 commentThe 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 commentThe 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 commentThe 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 commentThe 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:
We can live with the warning for now and I will add this as a note to #488 |
||
go 1.22 | ||
|
||
require ( | ||
decred.org/dcrwallet/v4 v4.1.2 | ||
|
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).