Skip to content

fix(golint): golangci-lint v2.15.0, and a probe that targets the image's own Go - #39

Merged
slayerjain merged 1 commit into
mainfrom
ci/golangci-lint-v2.15.0
Oct 23, 2026
Merged

slayerjain merged 1 commit into
mainfrom
ci/golangci-lint-v2.15.0

Conversation

@slayerjain

Copy link
Copy Markdown
Member

What changed

keploy-ci-golint/Dockerfile:

  • ARG GOLANGCI_LINT_VERSION=v2.14.0 -> v2.15.0, with the comment above it updated: v2.15.0's release binary is built with go1.27.0 and golang.org/x/tools v0.52.0, and it reads this image's go1.27.3 export data.
  • The end-of-build probe's go.mod now names this image's own Go (go env GOVERSION, 1.27.3 today, the same go line keploy and enterprise declare) instead of a fixed go 1.27.0, and the build log prints it.
    golangci-lint refuses to lint a module whose Go language version is newer than the Go it was built with (goutil.CheckGoVersion; it compares major.minor only, so a go1.27.0 build is fine for a go 1.27.3 module).
    With the fixed 1.27.0 target, a Go minor bump of this image paired with a golangci-lint release still built with the older minor would pass this build. It would then fail only in the lint lanes of the repos that move to the new Go. Now it fails here.

The image tag the lint pipelines use is not bumped here. That happens after the next release publishes the image.

What was run (amd64 test box, docker)

  • docker build --no-cache of keploy-ci-golint: OK. The probe step:
    golangci-lint has version 2.15.0 built with go1.27.0 from 25c5369a on 2026-10-16T11:03:09Z
    module probe
    go 1.27.3
    ... golangci-lint run ./...
    0 issues.
    
  • In the built image: go version -> go1.27.3 linux/amd64; go version -m /usr/local/bin/golangci-lint -> go1.27.0, golang.org/x/tools v0.52.0.
  • The upstream release binaries checked directly (go version -m): v2.14.0 and v2.15.0 are both built with go1.27.0.
  • This repo's "One Go patch in every image" check, run against the branch: passes (every image that ships Go names go1.27.3).
  • Smoke test: keploy/integrations golangci-lint run --timeout 7m ./... (its CI command) inside the built image. The lint runs to completion with no typecheck or load errors. It reports 21 new errcheck findings, all from the errcheck 1.20 -> 1.30 bump in v2.15.0: unchecked receives of an error from a channel, like case <-done: and <-srvErr. The same command in the published golint-1.2.48 (v2.14.0) reports 0 issues. Those findings are fixed in integrations before its pipeline moves to the new image.

…e's own Go

Bump keploy-ci-golint to golangci-lint v2.15.0. Its release binary is
built with go1.27.0 and golang.org/x/tools v0.52.0, and reads this
image's go1.27.3 export data: the end-of-build probe lints a module
that imports cmp, fmt and slices with it, 0 issues.

The probe's go.mod now names this image's own Go (go env GOVERSION,
1.27.3 today, the go line keploy and enterprise declare) instead of a
fixed 1.27.0. golangci-lint refuses to lint a module whose Go language
version is newer than the Go it was built with; with a fixed target,
a Go minor bump of this image paired with a release still built with
the older minor passed this build and failed only in the lint lanes of
the repos that moved to the new Go.

Signed-off-by: slayerjain <shubhamkjain@outlook.com>
@slayerjain
slayerjain marked this pull request as ready for review October 23, 2026 22:02
@slayerjain
slayerjain merged commit 7ee29d4 into main Oct 23, 2026
29 checks passed
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.

1 participant