Skip to content

Commit

Permalink
docs(depguard): add ignore-file-rules (golangci#2884)
Browse files Browse the repository at this point in the history
* docs: linters-settings: depguard: add missing `ignore-file-rules`

* Add an example without !
  • Loading branch information
maratori authored and SeigeC committed Apr 4, 2023
1 parent d368227 commit 43374cb
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions .golangci.reference.yml
Original file line number Diff line number Diff line change
Expand Up @@ -164,16 +164,28 @@ 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.
# Default: []
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:
Expand Down

0 comments on commit 43374cb

Please sign in to comment.