Skip to content

Override linter selection with the command line #715

@abustany

Description

@abustany

Version: 1.18.0 built from 31afdf8

It doesn't seem to be possible at the moment to disable specific linters for a given run: if a linter is enabled in the configuration file, disabling it using -D on the command line will result in an error. Would it make sense to consider that command line options have a higher precedence than the configuration file, instead of seeing this as a conflict?

The background for this issue is that we want to have different defaults for developers and for our CI pipeline, while sharing the bulk of the configuration. Having two config files would lead to lots of duplicated information...

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: configRelated to .golangci.yml and/or cli optionsenhancementNew feature or improvementstaleNo recent correspondence or work activity

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions