-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use path exclude rules on absolute paths instead of relative paths #1178
Comments
Hey, thank you for opening your first Issue ! 🙂 If you would like to contribute we have a guide for contributors. |
Note that this feature would be especially important for editor integrations like VSCode's vscode-go. Users have no option to control the cwd from which Typically, the only configuration that happens there is something like: "go.lintTool": "golangci-lint",
"go.lintFlags": [
"--fast",
"--timeout",
"5m"
], |
Are there any efforts related to this? It seems like a common enough issue. I can take a crack at it if it's a feature that would be accepted by the golangci team |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
This is really painful to enable a monorepo global ruleset. given
I can't have any path based rules in golangci.yml, because they have to be relative to where the golangci-lint command is being run, which has to be from module1 or module2 folder. |
Is your feature request related to a problem? Please describe.
Using path exclude rules is difficult because the issue path depends on which directory I run
golangci-lint
from.Describe the solution you'd like
I'd like path exclude rules to be evaluated on the absolute path of the issue, not the relative path that is output.
Describe alternatives you've considered
Can't think of a great alternative here.
Additional context
Example: If I have an exclude rule on a file
a/b/c.go
, this rule will not apply if I rungolangci-lint
from directorya/b/
.The text was updated successfully, but these errors were encountered: