Skip to content
Latchkey

golangci-lint "unsupported version of the configuration" (v2) in CI

golangci-lint v2 introduced a new config schema keyed by a version: "2" field. Running a v2 binary against a v1 .golangci.yml fails with an unsupported-version error before any linting.

What this error means

After the binary is upgraded to v2, the run fails with "level=error msg=\"unsupported version of the configuration\"" or a schema validation error against the old config.

golangci-lint
level=error msg="unsupported version of the configuration: \"\""

Common causes

A v1 config under a v2 binary

v2 expects version: "2" and a restructured config; a config written for v1 (no version field, old keys) is rejected.

The binary upgraded but the config did not migrate

The action or install bumped golangci-lint to v2 while .golangci.yml stayed on the v1 layout.

How to fix it

Migrate the config to v2

  1. Run the built-in migration command to convert the config.
  2. Review the generated version: "2" config and commit it.
  3. Re-run golangci-lint to confirm it loads.
Terminal
golangci-lint migrate
golangci-lint run ./...

Pin to v1 until you migrate

Keep the binary on the v1 line so the existing config keeps working, then migrate as a separate change.

.github/workflows/ci.yml
- uses: golangci/golangci-lint-action@v6
  with:
    version: v1.59.1

How to prevent it

  • Migrate the config in the same change that bumps to v2.
  • Pin the golangci-lint version in the action.
  • Read the v2 migration notes before upgrading.

Frequently asked questions

What causes ""unsupported version of the configuration""?
v2 expects version: "2" and a restructured config; a config written for v1 (no version field, old keys) is rejected.
How do I fix "unsupported version of the configuration"?
Migrate the config to v2

Related guides

References

Latchkey auto-heals failures like this one - detected, fixed, and retried without you. Start free → 30-day trial · No credit card