-
Notifications
You must be signed in to change notification settings - Fork 511
Open
Description
Currently, the clippy aspect doesn't traverse through deps
edges. Therefore, if you build a rust_binary
that depends on a rust_library
and the rust_library
has clippy issues, these won't be reported unless you also build the library.
To reproduce:
- Create this target in
test/clippy/BUILD.bazel
:
rust_binary(
name = "bad_transitive_dep",
srcs = ["src/main.rs"],
edition = "2018",
deps = [":bad_library"],
)
- Then, remove the
noclippy
tag from:bad_library
. - Run clippy:
bazel build --config=clippy test/clippy:bad_transitive_dep
-> Succeedsbazel build --config=clippy test/clippy:bad_library
-> Failsbazel build --config=clippy test/clippy:bad_library test/clippy:bad_transitive_dep
-> Fails
I would have expected building :bad_transitive_dep
to fail, since one of their dependencies fails.
I'm happy to implement the traversal functionality, but I wanted to check first before going deep into it: Is there any context I should be aware of? Is this against the philosophy of the the aspect?
I wasn't able to find anything in the Bazel slack or in the open issues, sorry if I missed anything.
Metadata
Metadata
Assignees
Labels
No labels