Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs(depguard): add ignore-file-rules #2884

Merged
merged 2 commits into from
May 30, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions .golangci.reference.yml
Original file line number Diff line number Diff line change
Expand Up @@ -163,16 +163,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"
ldez marked this conversation as resolved.
Show resolved Hide resolved

# Create additional guards that follow the same configuration pattern.
# Results from all guards are aggregated together.
additional-guards:
Expand Down