Skip to content

fix(NOJIRA-1): default golangci-lint to v2.15.0, which is built with Go 1.27 - #276

Merged
trapped merged 1 commit into
mainfrom
fix/NOJIRA-1_golangci-lint-go-1.27
Oct 21, 2026
Merged

trapped merged 1 commit into
mainfrom
fix/NOJIRA-1_golangci-lint-go-1.27

Conversation

@trapped

@trapped trapped commented Oct 21, 2026

Copy link
Copy Markdown
Member

Why

Repos that moved to Go 1.27.3 (modernizer campaign go_emudhra_ca_patch, Typeform/autonomous-coding-workflows#1419) fail Standard Lint with:

can't load config: the Go language version (go1.26) used to build golangci-lint is lower than the targeted Go version (1.27.3)

e.g. https://github.com/Typeform/account-service/actions/runs/39625368419 (PR #588). The log shows golangci-lint-version: v2.9.0, this workflow's default, which is built with Go 1.26.

It hits every PR in such a repo, rebased or not: the lint job checks out refs/pull/N/merge, which includes the go.mod on main. The modernizer's own PRs never saw it because this workflow is skipped for bot-authored PRs.

What

Raise the default golangci-lint-version from v2.9.0 to v2.15.0, the latest release. go version -m on the release binaries shows v2.14.0 and v2.15.0 are built with go1.27.0. Callers can still pin another version with the input.

To check before merging

  • Whether golangci-lint compares only major.minor of Go (the error prints go1.26, no patch), so that a binary built with go1.27.0 accepts a module at 1.27.3. I did not run the linter against a 1.27.3 module; the check is a run of Standard Lint in a Go 1.27.3 repo on this branch.
  • Callers use @v1: the fix reaches them only when that tag includes this change.
  • Newer golangci-lint may report new findings in repos that were on v2.9.0 (lint is only-new-issues by default).

…Go 1.27

v2.9.0 is built with Go 1.26. golangci-lint refuses to load the config of a module that declares a newer Go than it was built with, so once a repo moves to Go 1.27 (the eMudhra CA patch campaign, Go 1.27.3) every lint run fails with:

  can't load config: the Go language version (go1.26) used to build golangci-lint is lower than the targeted Go version (1.27.3)

v2.15.0 is the latest release and is built with go1.27.0 (checked with go version -m on the release binary). Callers can still pin another version with the golangci-lint-version input.
@trapped
trapped marked this pull request as ready for review October 21, 2026 15:42
@trapped
trapped requested a review from a team as a code owner October 21, 2026 15:42
@trapped
trapped merged commit 7813a01 into main Oct 21, 2026
4 checks passed
@pr-auditor

pr-auditor Bot commented Oct 21, 2026

Copy link
Copy Markdown

✅ Security Analysis Results

No security issues found. 1 files reviewed.


@pr-auditor rescan to re-run · Powered by Claude Sonnet 5.5 · Docs · #security-engineering-team

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