|
60 | 60 | run: make ui-react |
61 | 61 |
|
62 | 62 | - name: Install golangci-lint |
| 63 | + # `go install` (not the release install.sh + prebuilt binary) so the |
| 64 | + # linter is always built with the SAME Go toolchain this job just set |
| 65 | + # up — golangci-lint refuses to run when built with an older Go than |
| 66 | + # the module it's targeting, so a prebuilt binary silently breaks |
| 67 | + # every time the pinned toolchain in go.mod moves past it. install.sh |
| 68 | + # also matched the wrong release asset for v2.13.1 (grabbed the |
| 69 | + # .sbom.json instead of the tarball) and failed checksum verification. |
63 | 70 | run: | |
64 | | - curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b "$(go env GOPATH)/bin" v2.13.1 |
| 71 | + go install github.com/golangci/golangci-lint/v2/cmd/golangci-lint@v2.13.1 |
65 | 72 | echo "$(go env GOPATH)/bin" >> "$GITHUB_PATH" |
66 | 73 |
|
67 | 74 | - name: make check (fmt, vet, lint, unit+race tests, web lint+build) |
@@ -161,8 +168,15 @@ jobs: |
161 | 168 | run: make ui-react |
162 | 169 |
|
163 | 170 | - name: Install golangci-lint |
| 171 | + # `go install` (not the release install.sh + prebuilt binary) so the |
| 172 | + # linter is always built with the SAME Go toolchain this job just set |
| 173 | + # up — golangci-lint refuses to run when built with an older Go than |
| 174 | + # the module it's targeting, so a prebuilt binary silently breaks |
| 175 | + # every time the pinned toolchain in go.mod moves past it. install.sh |
| 176 | + # also matched the wrong release asset for v2.13.1 (grabbed the |
| 177 | + # .sbom.json instead of the tarball) and failed checksum verification. |
164 | 178 | run: | |
165 | | - curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b "$(go env GOPATH)/bin" v2.13.1 |
| 179 | + go install github.com/golangci/golangci-lint/v2/cmd/golangci-lint@v2.13.1 |
166 | 180 | echo "$(go env GOPATH)/bin" >> "$GITHUB_PATH" |
167 | 181 |
|
168 | 182 | - name: Run pre-commit |
|
0 commit comments