You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
exclude+severity rules: fix path matching when path prefix is used
When someone invokes golangci-lint inside a project, they can set the path
prefix to make the output look like the invocation had been done in the
root. But this prefix was ignored when checking path patters of exclude and
severity rules, so those only worked when golangci-lint was invoked in
the same (root?) directory.
The underlying problem is that the rules from the configuration get checked
before updating the path associated with the issues in the path fixer. There's
probably a reason for doing it in this order, so to make the prefix work, it
now gets passed down into rule processors and added there to the issue path
before checking against the path pattern.
This could have been done through a separate parameter, but bundling it in a
new fsutils helper struct made the change a bit smaller.
0 commit comments