fail build on any warnings when running clippy (#456)

* fail build on any warnings when running clippy

Currently warnings from rustc such as an unused import are printed
during first execution, but they do not fail the build. If cargo users
run clippy again, the same warnings get printed, but with Bazel nothing
is shown, as the previous success is cached.

This patch changes all warnings into errors, with the rationale being
that if we're failing for any clippy warning, it probably makes sense
to fail for rustc warnings as well.

* clippy aspect needs to include --test on command line for tests

Without it, items imported in integration tests generate unused import
warnings, which fail the build.

* tag bindgen libaries, and don't fail when they generate warnings
3 files changed
tree: 1197b139854d68db87543447977b3b7514092476
  1. .bazelci/
  2. bindgen/
  3. cargo/
  4. docs/
  5. examples/
  6. proto/
  7. rust/
  8. test/
  9. tools/
  10. util/
  11. wasm_bindgen/
  12. .bazelignore
  13. .gitignore
  14. AUTHORS
  15. BUILD
  16. CODEOWNERS
  17. CONTRIBUTING.md
  18. CONTRIBUTORS
  19. LICENSE.txt
  20. README.md
  21. WORKSPACE
  22. workspace.bzl
README.md

Rust Rules

  • Postsubmit Build status
  • Postsubmit + Current Bazel Incompatible Flags Build status

Overview

This repository provides rules for building Rust projects with Bazel.

Please refer to the full documentation.