golangci-lint "unknown linters" config error in CI
golangci-lint rejects your config because it names a linter it does not recognize. Linters get deprecated and removed across releases (for example golint, maligned, interfacer), so an upgraded binary fails on an old config.
What this error means
golangci-lint fails at config load with "level=error msg=\"[config_reader] unknown linters: 'golint', 'maligned'; ...\"" and does not lint.
level=error msg="[config_reader] unknown linters: 'golint', 'maligned';
run 'golangci-lint help linters' to see the list of supported linters"Common causes
A removed or renamed linter in the config
Linters like golint, maligned, scopelint, and interfacer were removed; configs that still enable them break on newer golangci-lint.
A typo in the linter name
A misspelled entry under linters.enable does not match any registered linter.
How to fix it
Remove or replace the unknown linters
- Run
golangci-lint help lintersto see what the installed version supports. - Delete removed names and swap in their replacements (for example
reviveforgolint). - Re-run to confirm the config loads.
golangci-lint help linters
golangci-lint run ./...Pin the golangci-lint version
Pin the binary so config and supported linters stay in sync, then migrate the config deliberately on upgrade.
- uses: golangci/golangci-lint-action@v6
with:
version: v1.59.1How to prevent it
- Review the golangci-lint changelog before bumping the version.
- Pin the linter version in the action.
- Run
golangci-lint config verify(orhelp linters) after upgrades.