-
-
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
more flexible loading of custom plugins #3826
Comments
Hey, thank you for opening your first Issue ! 🙂 If you would like to contribute we have a guide for contributors. |
Hello,
Do you mean: if the path is a relative path then use the env var as a root? Side note: maybe logcheck can be "merged" with loggercheck |
I would:
|
I was pinged again about this because it's still unsolved for containerized Kubernetes builds. Any preference on how to solve this? I'm leaning towards falling back to PATH when some relative path doesn't resolve to an actual file and could prepare a PR with that. |
Your feature request related to a problem? Please describe.
In Kubernetes, we have a
hack/golangci-lint.yaml
with a path for a logcheck.so which is relative to that config:https://github.com/kubernetes/kubernetes/blob/b09b7e5bdb1c763c6d7e47e2c792d54f37f7d9a2/hack/golangci.yaml#L42
That works because normally,
_output
contains build artifacts. It fails when using containerized builds where build artifacts are located elsewhere:kubernetes/kubernetes#117831
Describe the solution you'd like.
When loading a plugin, golangci-lint could first try the absolute or relative path and if that file doesn't exist, fall back to searching for the plugin in directories specified via env variables. This could be PATH (kind of convenient because the plugin gets compiled together with the golangci-lint binary to ensure that both use the same Go and compile options and already gets placed in the same directory) or a custom variable like GOLANGCI_LINT_CUSTOM_PLUGIN_PATH.
Describe alternatives you've considered.
Additional context.
No response
The text was updated successfully, but these errors were encountered: