Skip to content

Commit

Permalink
docs(gocritic): add enable and disable ruleguard settings (#2885)
Browse files Browse the repository at this point in the history
* docs: ruleguard: add missing `enable` and `disable` settings

* Don't use go-critic groups and tags
  • Loading branch information
maratori committed May 30, 2022
1 parent a23fc2c commit 42bbe40
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions .golangci.reference.yml
Expand Up @@ -474,6 +474,7 @@ linters-settings:
# ruleguard prints the specific Where() condition that was rejected.
#
# The flag is passed to the ruleguard 'debug-group' argument.
# Default: ""
debug: 'emptyDecl'
# Deprecated, use 'failOn' param.
# If set to true, identical to failOn='all', otherwise failOn=''
Expand All @@ -484,12 +485,22 @@ linters-settings:
# - 'all': fail on all errors.
# - 'import': ruleguard rule imports a package that cannot be found.
# - 'dsl': gorule file does not comply with the ruleguard DSL.
# Default: ""
failOn: dsl
# Comma-separated list of file paths containing ruleguard rules.
# If a path is relative, it is relative to the directory where the golangci-lint command is executed.
# The special '${configDir}' variable is substituted with the absolute directory containing the golangci config file.
# Glob patterns such as 'rules-*.go' may be specified.
# Default: ""
rules: '${configDir}/ruleguard/rules-*.go,${configDir}/myrule1.go'
# Comma-separated list of enabled groups or skip empty to enable everything.
# Tags can be defined with # character prefix.
# Default: "<all>"
enable: "myGroupName,#myTagName"
# Comma-separated list of disabled groups or skip empty to enable everything.
# Tags can be defined with # character prefix.
# Default: ""
disable: "myGroupName,#myTagName"
tooManyResultsChecker:
# Maximum number of results.
# Default: 5
Expand Down

0 comments on commit 42bbe40

Please sign in to comment.