Description
In order to allow all the go projects in my computer to use the .golangci.yml file directly instead of rewriting it every time, I put the .golangci.yml file in the home directory, like ~/.golangci.yml
.
In version V1, golangci-lint worked well, but when I updated to version V2, it did not work properly.
After investigation, I found that the cause of the problem was that the file path output by golangci-lint v2 was relative to the .golangci.yml file, not relative to the cwd.
in golangci-lint v1:

in golangci-lint v2:

It's looks like when matching the file path, if golangci-lint version is v2, then it needs to be matched relative to the directory where the .golangci.yml file is located, not cwd.
I have tried to fix it using this method, and it works well in both v1 and v2 versions. I will make a pull request later. Hope you can give suggestions or merge it when you are free!