Skip to content

rtk golangci-lint broken with golangci-lint v2 (injects removed --out-format flag) #596

@bnema

Description

@bnema

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions