Skip to content

golangci-lint v2 is reported clean: --out-format was removed and exit 3 is ignored #11

Closed

Description

@DatScreamer

runGolangciLint in src/harness/check-engine/tool-runners/go.ts still runs golangci-lint run --out-format=json. That flag was removed in golangci-lint v2 (March 2025). v2 exits 3 with unknown flag: --out-format, and the runner treats exit codes 0, 3, and 4 as a clean run, so interlinked check --only golangci-lint reports zero findings and never reads the output.

On v1, exit 3 meant an analysis failure, and skipping it was intentional. On v2, exit 3 is also what a rejected flag produces, so the skip hides the broken invocation. The v2 replacement is golangci-lint run --output.json.path stdout (https://golangci-lint.run/product/migration-guide/#output).

Repro with golangci-lint v2.13.2:

$ golangci-lint run --out-format=json ./...
Error: unknown flag: --out-format
$ echo $?
3

$ interlinked check --only golangci-lint --json
{ "golangci-lint": { "count": 0, "findings": [] } }

That check finished in well under a second. The same tree, run with --output.json.path, reports a real typecheck issue.

Expected:

• Detect golangci-lint v2 and pass --output.json.path stdout (keep --out-format=json only for v1).
• Do not treat a flag-parse failure as a clean result. Surface a verdict such as "golangci-lint did not produce a verdict" instead of count: 0.

Activity

  1. QuentinCody commented on Oct 9, 2026

    @QuentinCody
    Owner

    Fixed by fdfd1cf (merged in #14).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions