Closed
Description
What happened?
golangci-lint doesn't just look at the .go file specified on the command-line, it also needs to pull in metadata about e.g. types from other files that are referenced from the file that is being linted. Without this, it complains about missing files.
The lint target should inherit all dependencies of the original target, as well as dependencies on any generated files in srcs
as those are currently being filtered out (since they don't newed to be linted).
Version
Development (host) and target OS/architectures:
Output of bazel --version
:
bazel 7.0.2
Version of the Aspect rules, or other relevant rules from your
WORKSPACE
or MODULE.bazel
file:
N/A, reproducible using example from rules_lint
Language(s) and/or frameworks involved:
Go / golang-ci
How to reproduce
I'll attach a PR to this bug that demonstrates the issue with the example in the rules_lint repo.
Any other information?
No response