-
-
Notifications
You must be signed in to change notification settings - Fork 151
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
Allow to specify Go version #75
Comments
One thing to note, is that the version in the Based on the intent, a module with |
Yeah, good point about minimal supported version. So, maybe just allowing to specify
It should but sometimes doesn't in practice. Here's some output from running the linter on https://github.com/digitalbitbox/bitbox-wallet-app.
Even if it did work, the project we're working on can't officially support go1.15 due to some dependencies like gomobile and gopherjs. |
IMO the golangci-lint should not call the setup-go, it should be a requirement, or ti should check if the go is installed, the do nothing |
Yeah, that would be another option although more distruptive to all existing users of the action who already rely on setup-go. |
Perhaps check if Go is already set up and dont run setup-go in that case? My problem right now is that I am using Go 1.16beta1 - I have setup-go configured in my workflow to install that, but golangci-lint replaces it with 1.15.6 (current latest stable). And now lint is failing because the |
so, there is problem if I use golangci-lint-action then GitHub provides an image with pre installed go 1.14.x, so the go is always installed, I cannot reproduce the situation when go is not installed and the action will install it. |
so we need to decide Should we install go at all? |
@SVilgelm Feedback from your first comment, even if it turns out not to be a proper change. I added this to my workflow:
I run it with But that all worked properly. Since detecting if Go is installed is not viable, how about another parameter - |
@camh- I updated the PR with
I also added the golangci-lint binary to the PATH: https://github.com/sv-tools/bumptag/pull/64/checks?check_run_id=1620125930 |
@SVilgelm I can confirm that this latest version works too. I've removed my step that adds to the path, and I've added 👍 |
Any chance you guys could do a release with this in it???? |
Until they do, you can use |
... as it might install a later version by desing golangci/golangci-lint-action#75 Signed-off-by: Riccardo Ravaioli <[email protected]>
... since golangci-lint might install a later version by design: golangci/golangci-lint-action#75 Signed-off-by: Riccardo Ravaioli <[email protected]>
... since golangci-lint might install a later version by design: golangci/golangci-lint-action#75 Signed-off-by: Riccardo Ravaioli <[email protected]>
The golangci-lint-action@v2 installed the latest golang version, running it on the 0.12v branch that is pinned to the old go v1.16. This commit calls for setup-go@v2 for v1.16, and then calls golangci-lint with: skip-go-installation: true. as recommended here: golangci/golangci-lint-action#75
The metallb-operator is using go v1.16, however, the lint lane in the CI is downloading the latest go. This change fixes the version to v1.16 by first downloading go v1.16 using actions/setup-go@v2, and then calling golangci-lint with the skip-go-installation: true. This solution was recommended here: golangci/golangci-lint-action#75
This metallb-operator v0.12 is using go v1.16, however, the lint lane in the CI is installing the latest go. This change fixes the version to v1.16 by first downloading go v1.16 using actions/setup-go@v2, and then calling golangci-lint with the skip-go-installation: true. This solution was recommended here: golangci/golangci-lint-action#75
This metallb-operator v0.12 is using go v1.16, however, the lint lane in the CI is installing the latest go. This change fixes the version to v1.16 by first downloading go v1.16 using actions/setup-go@v2, and then calling golangci-lint with the skip-go-installation: true. This solution was recommended here: golangci/golangci-lint-action#75
This metallb-operator v0.12 is using go v1.16, however, the lint lane in the CI is installing the latest go. This change fixes the version to v1.16 by first downloading go v1.16 using actions/setup-go@v2, and then calling golangci-lint with the skip-go-installation: true. This solution was recommended here: golangci/golangci-lint-action#75
This metallb-operator v0.12 is using go v1.16, however, the lint lane in the CI is installing the latest go. This change fixes the version to v1.16 by first downloading go v1.16 using actions/setup-go@v2, and then calling golangci-lint with the skip-go-installation: true. This solution was recommended here: golangci/golangci-lint-action#75
The linter github action doesn't allow specifying a Go version. It overwrtes it to
1
in https://github.com/golangci/golangci-lint-action/blob/1d3f25b/src/install.ts#L60.It would be very useful if the linter picked the Go version specified in go.mod or at least had an action parameter. I made a working PoC in https://github.com/x1ddos/golangci-lint-action/commit/6f8897f but it's for the action version 1.2.2.
We have a project which can't upgrade to the latest go1.15 and had to remove the action in BitBoxSwiss/bitbox-wallet-app#982.
The text was updated successfully, but these errors were encountered: