Skip to content

Support ignoring test files and other directories for gosec linter #5064

@HydroH

Description

@HydroH

Welcome

Your feature request related to a problem? Please describe

gosec by default ignores test files, and supports ignoring additional folders with the -exclude-dir command line argument. This feature is not provided in golangci-lint.

Describe the solution you'd like

Add exclude-tests (boolean) and exclude-dir (array) options to gosec config with respective support.

Describe alternatives you've considered

The previous solution is straightfoward, I could not think of other alternatives.

Additional context

No response

Supporter

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionFurther information is requested

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions