Skip to content

ci: use supported golangci-lint installer#629

Open
diegomrsantos wants to merge 2 commits into
ssvlabs:spec-test-cifrom
diegomrsantos:fix/ci-stabilize-spec-tests
Open

ci: use supported golangci-lint installer#629
diegomrsantos wants to merge 2 commits into
ssvlabs:spec-test-cifrom
diegomrsantos:fix/ci-stabilize-spec-tests

Conversation

@diegomrsantos
Copy link
Copy Markdown

@diegomrsantos diegomrsantos commented May 7, 2026

Updates the golangci-lint installer URL from the retired master branch script to the supported installer URL recommended by upstream. This keeps the existing latest behavior while avoiding the checksum matching issue triggered by newer release assets.

The v2.12.2 tarball checksum itself appears valid; the failure is in the old installer path used by this repo. Upstream closed the issue as a duplicate and recommended this installer URL here: golangci/golangci-lint#6572 (comment)

No sync workflow behavior or generated spec-test behavior is changed.

Verification: installed the current latest linter locally through the supported installer URL and ran the lint target successfully.

@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps Bot commented May 7, 2026

Greptile Summary

This PR pins golangci-lint to a specific version (v2.11.4) in the lint-prepare Makefile target, preventing the lint job from silently picking up a broken upstream release. It also corrects the installer invocation by adding the required -- argument separator before the version string.

  • Introduces GOLANGCI_LINT_VERSION?=v2.11.4, overridable via environment variable, so the version can be bumped or temporarily overridden without editing the file.
  • Fixes the installer call from sh -s latest to sh -s -- $(GOLANGCI_LINT_VERSION), which is the correct syntax expected by the golangci-lint install script.

Confidence Score: 5/5

Safe to merge — the change is limited to the lint toolchain setup and does not touch any Go source, generated files, or test behaviour.

The only modified file is the Makefile, and both changes (pinning the version and correcting the -- separator) are straightforward improvements. No application logic, generated spec-test output, or CI workflow files are affected.

No files require special attention.

Important Files Changed

Filename Overview
Makefile Pins golangci-lint to v2.11.4 via a new GOLANGCI_LINT_VERSION variable and fixes the installer argument separator (adds -- before the version flag)

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A[make lint-prepare] --> B["curl golangci-lint install.sh"]
    B --> C{"GOLANGCI_LINT_VERSION set?"}
    C -- "Yes (env override)" --> D["Install specified version"]
    C -- "No (default)" --> E["Install v2.11.4"]
    D --> F["./bin/golangci-lint"]
    E --> F
    F --> G[make lint]
    G --> H["./bin/golangci-lint run -v ./..."]
Loading

Reviews (1): Last reviewed commit: "ci: pin golangci-lint version" | Re-trigger Greptile

Comment thread Makefile Outdated
.PHONY: lint-prepare
lint-prepare:
curl -sfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh| sh -s latest
curl -sfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- $(GOLANGCI_LINT_VERSION)
Copy link
Copy Markdown

@ldez ldez May 7, 2026

Choose a reason for hiding this comment

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

Suggested change
curl -sfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- $(GOLANGCI_LINT_VERSION)
curl -sfL https://golangci-lint.run/install.sh | sh -s latest

Comment thread Makefile Outdated
@@ -1,9 +1,10 @@
GOPATH?=$(shell go env GOPATH)
TEST_PKG?=./...
GOLANGCI_LINT_VERSION?=v2.11.4
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Suggested change
GOLANGCI_LINT_VERSION?=v2.11.4

@diegomrsantos diegomrsantos changed the title ci: pin golangci-lint version ci: use supported golangci-lint installer May 7, 2026
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.

2 participants