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

Bump golangci-lint to v1.55.1 #110

Merged
merged 7 commits into from
Oct 27, 2023
Merged

Conversation

unmultimedio
Copy link
Member

@unmultimedio unmultimedio commented Oct 27, 2023

@unmultimedio unmultimedio requested a review from pkwarren October 27, 2023 16:19
@@ -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
Copy link
Member

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

Copy link
Member Author

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?

Copy link
Member

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.

Copy link
Member

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.)

Copy link
Member Author

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?

@unmultimedio unmultimedio changed the title Bump golangci-lint Bump golangci-lint to v1.55.1 Oct 27, 2023
enable-all: true
disable:
- cyclop # covered by gocyclo
- deadcode # abandoned
Copy link
Member

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.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

@unmultimedio unmultimedio requested a review from pkwarren October 27, 2023 17:18
@unmultimedio unmultimedio merged commit cc22bc3 into main Oct 27, 2023
2 checks passed
@unmultimedio unmultimedio deleted the jfigueroa/bump-golangci-lint branch October 27, 2023 17:29
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

Successfully merging this pull request may close these issues.

4 participants