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

chore: makefile should use latest release of golangci-lint #1983

Merged
merged 7 commits into from
Aug 28, 2023

Conversation

jack0son
Copy link
Contributor

@jack0son jack0son commented Aug 11, 2023

Description

I ran in to this issue installing golangci-lint from source. Turns installing from source has a few known issues detailed here.

Specifically: it allows installation from master branch which can't be considered stable.

Running go install github.com/golangci/golangci-lint/cmd/golangci-lint caused issues with go.sum (likely because go.mod doesn't specify a version of golangci-lint. Fixed it by running install github.com/golangci/golangci-lint/cmd/golangci-lint@latest

solution
If we install golangci-lint from source we should either:
a. use a release version in the makefile
b. add golangci-lint to go.mod

Unsure which is appropriate - up to you guys. Just wanted to flag this in case anyone external runs into this issue.

@milapsheth
Copy link
Member

milapsheth commented Aug 11, 2023

@latest makes sense to me

@cjcobb23
Copy link
Contributor

Do we want latest, or do we want to pin to a specific version?

@milapsheth
Copy link
Member

Do we want latest, or do we want to pin to a specific version?

since it's a linter, i'd prefer to use the latest

@milapsheth
Copy link
Member

looks like the latest golangci-lint release requires go 1.20. pinned the older version instead. couldn't use the tools.go since the golangci-lint cmd doesn't have a go.mod

@milapsheth milapsheth merged commit 277c1fc into main Aug 28, 2023
6 of 7 checks passed
@milapsheth milapsheth deleted the chore/use_latest_golangci-lint branch August 28, 2023 19:24
@benjalimm
Copy link

+1 @jack0son

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.

5 participants