fix(ci): install golangci-lint via go install
- commit
- 7ed1723ff7779a7d1928797459f7df31c35899b2
- author
- brice · · 2026-06-11 20:50 UTC
- parent
- 747fc5a
- signature
- GPG Verified
CD88F9E564E0102646FB6077A1A07C7C7C3E349D· arch-gpg Verified for the committer email
1 file · +4 -3
M Makefile +4 -3
| @@ -158,9 +158,10 @@ fmt: ## Format Go code with gofmt | |||
| 158 | 158 | install-golangci-lint: ## Install pinned golangci-lint | |
| 159 | 159 | @echo "Installing golangci-lint $(GOLANGCI_LINT_VERSION) to $(TOOL_BIN_DIR)..." | |
| 160 | 160 | @mkdir -p $(TOOL_BIN_DIR) | |
| 161 | - | # Accepted trade-off: use the upstream installer entrypoint, but keep the | |
| 162 | - | # requested golangci-lint version pinned in this repo for reproducible tool use. | |
| 163 | - | curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(TOOL_BIN_DIR) $(GOLANGCI_LINT_VERSION) | |
| 161 | + | # Build the pinned version with the active Go toolchain instead of using the | |
| 162 | + | # upstream install.sh helper, which currently misidentifies release assets now | |
| 163 | + | # that golangci-lint publishes sibling .sbom.json files for each tarball. | |
| 164 | + | GOBIN=$(TOOL_BIN_DIR) go install github.com/golangci/golangci-lint/v2/cmd/golangci-lint@$(GOLANGCI_LINT_VERSION) | |
| 164 | 165 | ||
| 165 | 166 | install-staticcheck: ## Install pinned Staticcheck with the active Go toolchain | |
| 166 | 167 | @echo "Installing staticcheck $(STATICCHECK_VERSION)..." | |
| @@ -158,9 +158,10 @@ fmt: ## Format Go code with gofmt | |||||
| 158 | install-golangci-lint: ## Install pinned golangci-lint | 158 | install-golangci-lint: ## Install pinned golangci-lint | ||
| 159 | @echo "Installing golangci-lint $(GOLANGCI_LINT_VERSION) to $(TOOL_BIN_DIR)..." | 159 | @echo "Installing golangci-lint $(GOLANGCI_LINT_VERSION) to $(TOOL_BIN_DIR)..." | ||
| 160 | @mkdir -p $(TOOL_BIN_DIR) | 160 | @mkdir -p $(TOOL_BIN_DIR) | ||
| 161 | - | # Accepted trade-off: use the upstream installer entrypoint, but keep the | 161 | + | # Build the pinned version with the active Go toolchain instead of using the |
| 162 | - | # requested golangci-lint version pinned in this repo for reproducible tool use. | 162 | + | # upstream install.sh helper, which currently misidentifies release assets now |
| 163 | - | curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(TOOL_BIN_DIR) $(GOLANGCI_LINT_VERSION) | 163 | + | # that golangci-lint publishes sibling .sbom.json files for each tarball. |
| 164 | + | GOBIN=$(TOOL_BIN_DIR) go install github.com/golangci/golangci-lint/v2/cmd/golangci-lint@$(GOLANGCI_LINT_VERSION) | |||
| 164 | 165 | ||||
| 165 | install-staticcheck: ## Install pinned Staticcheck with the active Go toolchain | 166 | install-staticcheck: ## Install pinned Staticcheck with the active Go toolchain | ||
| 166 | @echo "Installing staticcheck $(STATICCHECK_VERSION)..." | 167 | @echo "Installing staticcheck $(STATICCHECK_VERSION)..." | ||