Description
Welcome
- Yes, I've searched similar issues on GitHub and didn't find any.
- I agree to follow this project's Code of Conduct
How did you install golangci-lint?
Official GitHub Action
Your feature request related to a problem? Please describe
Specifying a relative path mode of cfg is needed to reliably detect additional config files such as for ruleguard.
Unfortunately this then results in linter outputs using paths relative to the cfg directory too so they start with eg ../../../../../../
breaking CI workflows from referencing the right file
Describe the solution you'd like
A way to specify ruleguard configuration relative to the config directory but path outputs relative to either the working directory, gitroot, or go mod root would fix the issue.
Describe alternatives you've considered
This seemed to work fine under golangci-lint 1.x. Specifying gitroot as the relative-path-mode breaks loading ruleguard rules but output paths are fine, specifying cfg allows ruleguard rules to load fine but output paths are wrong.
Additional context
ruleguard config:
ruleguard:
failOn: all
rules: ${base-path}/ruleguard/*.go
Supporter
- I am a sponsor through GitHub or OpenCollective