Why this config doesn't exclude these files? #2284
-
Welcome
Description of the problemI'm using a config like this: issues:
exclude-rules:
- path: internal/custom/dir/*.custom.go
linters:
- wrapcheck but it doesn't work. It works if I use this instead: issues:
exclude-rules:
- path: .custom.go
linters:
- wrapcheck Why? Version of golangci-lint$ golangci-lint --version
golangci-lint has version 1.42.1 built from 54f4301d on 2021-09-06T17:05:10Z Go environment$ go version && go env
# go version go1.17.2 windows/amd64 |
Beta Was this translation helpful? Give feedback.
Answered by
ldez
Oct 8, 2021
Replies: 1 comment
-
Hello, the The right configuration: linters:
disable-all: true
enable:
- wrapcheck
issues:
exclude-rules:
- path: internal/custom/dir/(.*).custom.go
linters:
- wrapcheck |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
ldez
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hello,
the
path
is a regex field, not a glob field.so
*
cannot be used alone.The right configuration: