docs(depguard): add ignore-file-rules
(#2884)
* docs: linters-settings: depguard: add missing `ignore-file-rules` * Add an example without !
This commit is contained in:
parent
085b7ea3bf
commit
a23fc2c7f0
@ -164,9 +164,11 @@ linters-settings:
|
||||
include-go-root: true
|
||||
|
||||
# A list of packages for the list type specified.
|
||||
# Can accept both string prefixes and string glob patterns.
|
||||
# Default: []
|
||||
packages:
|
||||
- github.com/sirupsen/logrus
|
||||
- allow/**/pkg
|
||||
|
||||
# A list of packages for the list type specified.
|
||||
# Specify an error message to output when a denied package is used.
|
||||
@ -174,6 +176,16 @@ linters-settings:
|
||||
packages-with-error-message:
|
||||
- github.com/sirupsen/logrus: 'logging is allowed only by logutils.Log'
|
||||
|
||||
# Specify rules by which the linter ignores certain files for consideration.
|
||||
# Can accept both string prefixes and string glob patterns.
|
||||
# The ! character in front of the rule is a special character
|
||||
# which signals that the linter should negate the rule.
|
||||
# This allows for more precise control, but it is only available for glob patterns.
|
||||
# Default: []
|
||||
ignore-file-rules:
|
||||
- "ignore/**/*.go"
|
||||
- "!**/*_test.go"
|
||||
|
||||
# Create additional guards that follow the same configuration pattern.
|
||||
# Results from all guards are aggregated together.
|
||||
additional-guards:
|
||||
|
Loading…
x
Reference in New Issue
Block a user