
* Add variable for ruleguard config directory * Add variable for ruleguard config directory * Add variable for ruleguard config directory * Add variable for ruleguard config directory * Add unit tests * Add unit tests for ruleguard * Add unit tests for ruleguard * Add unit tests for ruleguard * Add unit tests for ruleguard, fix package name
20 lines
842 B
YAML
20 lines
842 B
YAML
linters-settings:
|
|
gocritic:
|
|
enabled-checks:
|
|
- rangeValCopy
|
|
- flagDeref
|
|
- ruleguard
|
|
settings:
|
|
rangevalcopy:
|
|
sizethreshold: 2
|
|
ruleguard:
|
|
debug: dupSubExpr
|
|
failOn: dsl,import
|
|
# comma-separated paths to ruleguard files.
|
|
# The ${configDir} is substituted by the directory containing the golangci-lint config file.
|
|
# Note about the directory structure for functional tests:
|
|
# The ruleguard files used in functional tests cannot be under the 'testdata' directory.
|
|
# This is because they import the 'github.com/quasilyte/go-ruleguard/dsl' package,
|
|
# which needs to be added to go.mod. The testdata directory is ignored by go mod.
|
|
rules: '${configDir}/../../ruleguard/strings_simplify.go,${configDir}/../../ruleguard/dup.go'
|