mirror of
https://github.com/scratchfoundation/golangci-lint.git
synced 2025-08-10 21:38:44 -04:00
rules: support inverted path match (#3617)
This commit is contained in:
parent
0b8ebea959
commit
8fde4632fa
12 changed files with 127 additions and 25 deletions
docs/src/docs/usage
|
@ -81,6 +81,18 @@ issues:
|
|||
- goconst
|
||||
```
|
||||
|
||||
The opposite, excluding reports **except** for specific paths, is also possible.
|
||||
In the following example, only test files get checked:
|
||||
|
||||
```yml
|
||||
issues:
|
||||
exclude-rules:
|
||||
- path-except: '(.+)_test\.go'
|
||||
linters:
|
||||
- funlen
|
||||
- goconst
|
||||
```
|
||||
|
||||
In the following example, all the reports related to the files (`skip-files`) are excluded:
|
||||
|
||||
```yml
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue