Skip to content

Let me selectively disable linters from CLI which are enabled in the config #1272

Closed
@julienschmidt

Description

@julienschmidt

Is your feature request related to a problem? Please describe.
I use golangci-lint with a global .golangci-lint.yaml config in my daily dev flow. I sometimes use it to check code that I don't own (so adding a local config is not really a solution).

Sometimes a linter from my default config causes problems or gives too many results, thus I'd like to disable it.

Describe the solution you'd like

I'd like a way to disable a (set of) specific linter(s) from the CLI, i.e. the -D flag should have precedence over the enable list in my global config. Currently this is not allowed:

Running error: linter "superduperlinter" can't be disabled and enabled at one moment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or improvement

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions