Skip to content

Commit

Permalink
Add convenience config to test clippy
Browse files Browse the repository at this point in the history
Since the Bazel Aspect for Clippy fails on warnings, we need to gate
this behind a config flag for now. The config gate is temporary until we
can enable clippy by default during tests.
  • Loading branch information
aaronmondal committed Jul 11, 2023
1 parent 86d8c60 commit 1185876
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions .bazelrc
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,18 @@ build --aspects=@rules_rust//rust:defs.bzl%rustfmt_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

0 comments on commit 1185876

Please sign in to comment.