Executes the clippy checker on a specific target.
Similar to rust_clippy_aspect
, but allows specifying a list of dependencies within the build system.
For example, given the following example targets:
package(default_visibility = ["//visibility:public"]) load("@rules_rust//rust:rust.bzl", "rust_library", "rust_test") rust_library( name = "hello_lib", srcs = ["src/lib.rs"], ) rust_test( name = "greeting_test", srcs = ["tests/greeting.rs"], deps = [":hello_lib"], )
Rust clippy can be set as a build target with the following:
rust_clippy( name = "hello_library_clippy", testonly = True, deps = [ ":hello_lib", ":greeting_test", ], )
ATTRIBUTES
Name | Description | Type | Mandatory | Default |
---|---|---|---|---|
name | A unique name for this target. | Name | required | |
deps | - | List of labels | optional | [] |