Bug
rtk golangci-lint run ./... fails on golangci-lint v2 with a misleading error:
golangci-lint (JSON parse failed: EOF while parsing a value at line 1 column 0)
Running with -v shows that the wrapper injects --out-format=json, which was removed in golangci-lint v2:
Running: golangci-lint run --out-format=json
Error: unknown flag: --out-format
The subprocess exits before producing any JSON output, and rtk tries to parse the empty stdout, which causes the EOF parse error.
Running golangci-lint directly works fine:
$ /usr/bin/golangci-lint version
golangci-lint has version 2.11.3 built with go1.26.1
$ /usr/bin/golangci-lint run ./...
0 issues.
References
Environment
- rtk: latest
- golangci-lint: 2.11.3
- OS: Linux