rules: support inverted path match ()

This commit is contained in:
Patrick Ohly 2023-05-31 17:25:59 +02:00 committed by GitHub
parent 0b8ebea959
commit 8fde4632fa
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
12 changed files with 127 additions and 25 deletions
docs/src/docs/usage

View file

@ -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