@@ -535,6 +535,8 @@ linters-settings:
535535 # Default: "original"
536536 list-mode : lax
537537 # 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`.
538540 # Default: $all
539541 files :
540542 - " !**/*_a _file.go"
@@ -1364,11 +1366,11 @@ linters-settings:
13641366 # Default: ""
13651367 failOn : dsl,import
13661368 # 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` .
13691371 # Glob patterns such as 'rules-*.go' may be specified.
13701372 # Default: ""
1371- rules : ' ${configDir }/ruleguard/rules-*.go,${configDir }/myrule1.go'
1373+ rules : ' ${base-path }/ruleguard/rules-*.go,${base-path }/myrule1.go'
13721374 # Comma-separated list of enabled groups or skip empty to enable everything.
13731375 # Tags can be defined with # character prefix.
13741376 # Default: "<all>"
@@ -1461,6 +1463,8 @@ linters-settings:
14611463 # limitations under the License.
14621464 # As alternative of directive 'template', you may put the path to file with the template source.
14631465 # 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`.
14641468 # Default: ""
14651469 template-path : /path/to/my/template.tmpl
14661470
@@ -4168,7 +4172,7 @@ run:
41684172 # - `gitroot`: the paths will be relative to the git root (the parent directory of `.git`).
41694173 # - `cfg`: the paths will be relative to the configuration file.
41704174 # - `wd` (NOT recommended): the paths will be relative to the place where golangci-lint is run.
4171- # Default: wd
4175+ # Default: cfg
41724176 relative-path-mode : gomod
41734177
41744178 # Exit code when at least one issue was found.
0 commit comments