-
Notifications
You must be signed in to change notification settings - Fork 14
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
Bump golangci-lint to v1.55.1 #110
Conversation
make/go/dep_golangci_lint.mk
Outdated
@@ -7,9 +7,9 @@ $(call _assert_var,CACHE_VERSIONS) | |||
$(call _assert_var,CACHE_BIN) | |||
|
|||
# Settable | |||
# https://github.com/golangci/golangci-lint/releases 20230821 checked 20230828 | |||
# https://github.com/golangci/golangci-lint/releases 20231025 checked 20231027 | |||
# Check for new linters and add to .golangci.yml (even if commented out) when upgrading |
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.
do we need to add the new linters to .golangci.yml? looks like there's a few in https://github.com/golangci/golangci-lint/releases/tag/v1.55.0
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.
Yeah, I was reading the release notes to check which ones I should add, but I wish there was an easier way to maintain/add newly added linters. For context, do you know why don't we do enable-all: true
and let each individual project choose which linters they'd like to disable?
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.
We should use enable-all
. Ideally, we'd also converge on a shared list of plugins to disable and configuration for the plugins that we leave on. The config in connect-go is (I think) the best starting place.
Peter and I talked about this a long time ago, but never dedicated the time to get core or the CLI migrated over.
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 suggesting that we start with the connect-go
config because as far as I know it aligns most closely with what Peter wants, and it comes closest to mechanically enforcing our style guide. There's still a lot more we could automate, but that's a larger project.)
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 that's a larger project, for now if it's ok I'll copy the config from connect-go
, strip it from specific connect configs, and use it here. Also for context, I just checked and the copyfrommakego
cmd in buf and we don’t actually copy the .golangci.yml
on every update, so I guess it’s just useful for new projects?
enable-all: true | ||
disable: | ||
- cyclop # covered by gocyclo | ||
- deadcode # abandoned |
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 think we want to exclude depguard - newer versions require explicit config to depend on anything outside of the Go stdlib.
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.
Done
connect-go
as base