Skip to content

Commit

Permalink
Enable clippy by default for tests
Browse files Browse the repository at this point in the history
After this change it is a hard error to commit anything that doesn't
conform to Clippy's default warning set.
  • Loading branch information
aaronmondal committed Jul 15, 2023
1 parent 1491d0a commit f211ef2
Showing 1 changed file with 5 additions and 16 deletions.
21 changes: 5 additions & 16 deletions .bazelrc
Expand Up @@ -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

0 comments on commit f211ef2

Please sign in to comment.