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
|
include-go-root: true
|
||||||
|
|
||||||
# A list of packages for the list type specified.
|
# A list of packages for the list type specified.
|
||||||
|
# Can accept both string prefixes and string glob patterns.
|
||||||
# Default: []
|
# Default: []
|
||||||
packages:
|
packages:
|
||||||
- github.com/sirupsen/logrus
|
- github.com/sirupsen/logrus
|
||||||
|
- allow/**/pkg
|
||||||
|
|
||||||
# A list of packages for the list type specified.
|
# A list of packages for the list type specified.
|
||||||
# Specify an error message to output when a denied package is used.
|
# Specify an error message to output when a denied package is used.
|
||||||
@ -174,6 +176,16 @@ linters-settings:
|
|||||||
packages-with-error-message:
|
packages-with-error-message:
|
||||||
- github.com/sirupsen/logrus: 'logging is allowed only by logutils.Log'
|
- 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.
|
# Create additional guards that follow the same configuration pattern.
|
||||||
# Results from all guards are aggregated together.
|
# Results from all guards are aggregated together.
|
||||||
additional-guards:
|
additional-guards:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user