-
-
Notifications
You must be signed in to change notification settings - Fork 12
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
Support staticcheck analyzer globs #38
Comments
Or the "all" and "-ST1000" type syntax. Currently I can't copy the list of analyzers from my "staticcheck.conf", as it is of the form |
We don't support the For more details, see nogo-analyzer/staticcheck/def.bzl Lines 207 to 208 in fc5266f
An example of using it could be found here https://github.com/buildbuddy-io/buildbuddy/blob/09476dae4223fad357d6220be5e5231ecef34f45/BUILD#L135-L158 As for the glob syntax, I highly doubt that we would be able to support it with the current setup. The reason is that we are declaring each analyzer as its own dedicated Go package. This lets us have a dedicated Bazel target for each analyzer, allowing fine-grained build and dependencies. This lets us do the analyzer selection on the starlark level, which does not provide a globbing matcher on a list of strings. We could, theoretically group this analyzer up into bigger packages. Such as grouping all |
staticcheck supports using globs to enable and disable specific checks. This doesn't work in the analyzer, resulting in
Error in pop: KeyError: "@com_github_sluongng_nogo_analyzer//staticcheck:QF*"
.It would be great to support the glob syntax.
https://staticcheck.dev/docs/configuration/options/
The text was updated successfully, but these errors were encountered: