docs(gocritic): add enable
and disable
ruleguard settings (#2885)
* docs: ruleguard: add missing `enable` and `disable` settings * Don't use go-critic groups and tags
This commit is contained in:
parent
a23fc2c7f0
commit
42bbe403bc
@ -474,6 +474,7 @@ linters-settings:
|
|||||||
# ruleguard prints the specific Where() condition that was rejected.
|
# ruleguard prints the specific Where() condition that was rejected.
|
||||||
#
|
#
|
||||||
# The flag is passed to the ruleguard 'debug-group' argument.
|
# The flag is passed to the ruleguard 'debug-group' argument.
|
||||||
|
# Default: ""
|
||||||
debug: 'emptyDecl'
|
debug: 'emptyDecl'
|
||||||
# Deprecated, use 'failOn' param.
|
# Deprecated, use 'failOn' param.
|
||||||
# If set to true, identical to failOn='all', otherwise failOn=''
|
# If set to true, identical to failOn='all', otherwise failOn=''
|
||||||
@ -484,12 +485,22 @@ linters-settings:
|
|||||||
# - 'all': fail on all errors.
|
# - 'all': fail on all errors.
|
||||||
# - 'import': ruleguard rule imports a package that cannot be found.
|
# - 'import': ruleguard rule imports a package that cannot be found.
|
||||||
# - 'dsl': gorule file does not comply with the ruleguard DSL.
|
# - 'dsl': gorule file does not comply with the ruleguard DSL.
|
||||||
|
# Default: ""
|
||||||
failOn: dsl
|
failOn: dsl
|
||||||
# Comma-separated list of file paths containing ruleguard rules.
|
# 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.
|
# 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.
|
# The special '${configDir}' variable is substituted with the absolute directory containing the golangci config file.
|
||||||
# Glob patterns such as 'rules-*.go' may be specified.
|
# Glob patterns such as 'rules-*.go' may be specified.
|
||||||
|
# Default: ""
|
||||||
rules: '${configDir}/ruleguard/rules-*.go,${configDir}/myrule1.go'
|
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:
|
tooManyResultsChecker:
|
||||||
# Maximum number of results.
|
# Maximum number of results.
|
||||||
# Default: 5
|
# Default: 5
|
||||||
|
Loading…
x
Reference in New Issue
Block a user