diff --git a/.bazelrc b/.bazelrc index 277e3bc5e..4923c5452 100644 --- a/.bazelrc +++ b/.bazelrc @@ -28,21 +28,10 @@ build:self_execute --remote_default_exec_properties=cpu_count=1 build:self_execute --platform_suffix=self-execute build --aspects=@rules_rust//rust:defs.bzl%rustfmt_aspect +build --aspects=@rules_rust//rust:defs.bzl%rust_clippy_aspect + test --@rules_rust//:rustfmt.toml=//:.rustfmt.toml -# This will make rustfmt only run on `bazel test`. -test --output_groups=+rustfmt_checks -# TODO: The repo doesn't build with clippy enabled yet and this aspect will fail -# even on warnings. To test a single build target: -# -# bazel build --config=clippy mytarget -# -# To test current conformance of the entire repository, run tests with: -# -# bazel test --config=clippy --keep_going ... -# -# When all warnings are fixed the config gate will be removed and clippy -# will be enabled by default during tests. -build:clippy --aspects=@rules_rust//rust:defs.bzl%rust_clippy_aspect -build:clippy --output_groups=+clippy_checks -test:clippy --output_groups=+clippy_checks +# This will make rustfmt and clippy only run on `bazel test`. +test --output_groups=+rustfmt_checks +test --output_groups=+clippy_checks