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

Update the installation URL of golangci-lint #784

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion hack/run-lint.sh
Expand Up @@ -23,7 +23,7 @@ gopath="$(go env GOPATH)"
if ! [[ -x "$gopath/bin/golangci-lint" ]]; then
echo >&2 'Installing golangci-lint'
curl --silent --fail --location \
https://install.goreleaser.com/github.com/golangci/golangci-lint.sh | sh -s -- -b "$gopath/bin" v1.44.0
https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b "$gopath/bin" v1.44.0
Copy link
Member

Choose a reason for hiding this comment

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

let's just do go install github.com/golangci/golangci-lint/cmd/golangci-lint@v1.46.2 as the project page suggests?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Note that the project doesn't recommend it:

Install from Source
Note: such go install/go get installation aren't guaranteed to work. We recommend using binary installation.

Anyway, pushed the change via d80edeb (it's a bit slower than the binary installation, comparing https://github.com/kubernetes-sigs/krew/runs/6596083051?check_suite_focus=true and https://github.com/kubernetes-sigs/krew/runs/6592749482?check_suite_focus=true).
Didn't update the version because some newer versions have a lint issue, see #778 (comment).

Copy link
Member

Choose a reason for hiding this comment

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

we can revert back to https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b "$gopath/bin" v1.44.0 if you want.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'm new here and don't have a strong opinion, but using the precompiled binary seems enough on CI. Dropped the commit but if someone prefers go install one, I'm happy to push back it :)

fi

# configured by .golangci.yml
Expand Down