Skip to content

Commit a23fc2c

Browse files
authored
docs(depguard): add ignore-file-rules (#2884)
* docs: linters-settings: depguard: add missing `ignore-file-rules` * Add an example without !
1 parent 085b7ea commit a23fc2c

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

.golangci.reference.yml

+12
Original file line numberDiff line numberDiff line change
@@ -164,16 +164,28 @@ linters-settings:
164164
include-go-root: true
165165

166166
# A list of packages for the list type specified.
167+
# Can accept both string prefixes and string glob patterns.
167168
# Default: []
168169
packages:
169170
- github.com/sirupsen/logrus
171+
- allow/**/pkg
170172

171173
# A list of packages for the list type specified.
172174
# Specify an error message to output when a denied package is used.
173175
# Default: []
174176
packages-with-error-message:
175177
- github.com/sirupsen/logrus: 'logging is allowed only by logutils.Log'
176178

179+
# Specify rules by which the linter ignores certain files for consideration.
180+
# Can accept both string prefixes and string glob patterns.
181+
# The ! character in front of the rule is a special character
182+
# which signals that the linter should negate the rule.
183+
# This allows for more precise control, but it is only available for glob patterns.
184+
# Default: []
185+
ignore-file-rules:
186+
- "ignore/**/*.go"
187+
- "!**/*_test.go"
188+
177189
# Create additional guards that follow the same configuration pattern.
178190
# Results from all guards are aggregated together.
179191
additional-guards:

0 commit comments

Comments
 (0)