@@ -535,6 +535,8 @@ linters-settings:
535
535
# Default: "original"
536
536
list-mode : lax
537
537
# List of file globs that will match this list of settings to compare against.
538
+ # By default, if a path is relative, it is relative to the directory where the golangci-lint command is executed.
539
+ # The placeholder '${base-path}' is substituted with a path relative to the mode defined with `run.relative-path-mode`.
538
540
# Default: $all
539
541
files :
540
542
- " !**/*_a _file.go"
@@ -1364,11 +1366,11 @@ linters-settings:
1364
1366
# Default: ""
1365
1367
failOn : dsl,import
1366
1368
# Comma-separated list of file paths containing ruleguard rules.
1367
- # If a path is relative, it is relative to the directory where the golangci-lint command is executed.
1368
- # The special '${configDir }' variable is substituted with the absolute directory containing the golangci-lint config file .
1369
+ # By default, if a path is relative, it is relative to the directory where the golangci-lint command is executed.
1370
+ # The placeholder '${base-path }' is substituted with a path relative to the mode defined with `run.relative-path-mode` .
1369
1371
# Glob patterns such as 'rules-*.go' may be specified.
1370
1372
# Default: ""
1371
- rules : ' ${configDir }/ruleguard/rules-*.go,${configDir }/myrule1.go'
1373
+ rules : ' ${base-path }/ruleguard/rules-*.go,${base-path }/myrule1.go'
1372
1374
# Comma-separated list of enabled groups or skip empty to enable everything.
1373
1375
# Tags can be defined with # character prefix.
1374
1376
# Default: "<all>"
@@ -1461,6 +1463,8 @@ linters-settings:
1461
1463
# limitations under the License.
1462
1464
# As alternative of directive 'template', you may put the path to file with the template source.
1463
1465
# Useful if you need to load the template from a specific file.
1466
+ # By default, if a path is relative, it is relative to the directory where the golangci-lint command is executed.
1467
+ # The placeholder '${base-path}' is substituted with a path relative to the mode defined with `run.relative-path-mode`.
1464
1468
# Default: ""
1465
1469
template-path : /path/to/my/template.tmpl
1466
1470
@@ -4168,7 +4172,7 @@ run:
4168
4172
# - `gitroot`: the paths will be relative to the git root (the parent directory of `.git`).
4169
4173
# - `cfg`: the paths will be relative to the configuration file.
4170
4174
# - `wd` (NOT recommended): the paths will be relative to the place where golangci-lint is run.
4171
- # Default: wd
4175
+ # Default: cfg
4172
4176
relative-path-mode : gomod
4173
4177
4174
4178
# Exit code when at least one issue was found.
0 commit comments