Closed
Description
Welcome
- Yes, I'm using a binary release within 2 latest releases. Only such installations are supported.
- Yes, I've searched similar issues on GitHub and didn't find any.
- Yes, I've read the
typecheck
section of the FAQ. - Yes, I've tried with the standalone linter if available (e.g., gocritic, go vet, etc.).
- I agree to follow this project's Code of Conduct
How did you install golangci-lint?
Brew
Description of the problem
golangci-lint custom
is supposed to support color flags
I want to be able to deactivate, but I cannot.
I feel like a flag is not parsed.
Version of golangci-lint
$ golangci-lint --version
golangci-lint has version 2.1.6 built with go1.24.2 from eabc263 on 2025-05-04T15:36:41Z
Configuration
This is a .custom-gcl.yml file
version: v2.1.6
plugins:
- module: foo
path: .
Go environment
$ go version && go env
# not relevant
Verbose output of running
$ golangci-lint custom --help
Build a version of golangci-lint with custom linters
Usage:
golangci-lint custom [flags]
Global Flags:
--color string Use color when printing; can be 'always', 'auto', or 'never' (default "auto")
-h, --help Help for a command
-v, --verbose Verbose output
A minimal reproducible example or link to a public repository
- Create a new folder with mktemp -d
- cd to it
- Create this .custom-gcl.yml file
version: v2.1.6
plugins:
- module: foo
path: .
You need nothing else, no code, no plugin, just this file
$ golangci-lint custom -v --color=never
$ NO_COLOR=1 golangci-lint custom -v --color=never
The custom command fails as there is nothing it can build.
But the colors are present.
This issue also occurs when a module is fully set up
Validation
- Yes, I've included all information above (version, config, etc.).
Supporter
- I am a sponsor/backer through GitHub or OpenCollective