Repository navigation
fix(NOJIRA-1): default golangci-lint to v2.15.0, which is built with Go 1.27 - #276
Merged
Merged
Conversation
…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
marked this pull request as ready for review
October 21, 2026 15:42
aeryaguzov
approved these changes
Oct 21, 2026
✅ Security Analysis ResultsNo security issues found. 1 files reviewed.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
Repos that moved to Go 1.27.3 (modernizer campaign
go_emudhra_ca_patch, Typeform/autonomous-coding-workflows#1419) fail Standard Lint with: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 thego.modonmain. The modernizer's own PRs never saw it because this workflow is skipped for bot-authored PRs.What
Raise the default
golangci-lint-versionfromv2.9.0tov2.15.0, the latest release.go version -mon 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
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.@v1: the fix reaches them only when that tag includes this change.only-new-issuesby default).