Skip to content

DefaultExcludePatterns should only be used for specified linter #1474

Closed
@zhangyunhao116

Description

@zhangyunhao116

golangci-lint set --exclude-use-default=true by default, but the exclude pattern is used for global match but not for specified linter(we can see the linter in pkg/config/config.go). I develop a new linter, one rule just check whether there is at least one package comment in a Go package, but the issue match EXC0002 for golint, so it is ignored by default.

I think we can make some changes to the processor in pkg/result/processors/exclude_rules.go, so that it can handle both exclude global match and exclude specified match for some linters.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions