Optionally capture clippy lints as a build output (#937)

* Allow clippy lints to optionally be captured as a build output, so they
can be consumed by downstream tools integrated with the build system.

* Fix buildifier lint.

* Fix buildifier lints.

* Fix missing import of ClippyInfo

* Fix path for //:capture_clippy_output

* Return ClippyInfo even if there is no crate info

* Add test for failure semantics when capturing clippy output.

* Fully qualify :providers.bzl

* Rename ClippyConfigInfo to CaptureClippyOutputInfo

* Update doc fields to state that captured output uses the configured error_format

* Sort loads.

* Sort loads.

* Merge capture_output logic into a single if block.

* Regenerate documentation

* Build documentation for capture_clippy_output.

* Update docs.

* Update human-readable docs to specify that captured clippy output uses the configured error_format.

* Make redundant doc fields consistent. Move CaptureClippyOutputInfo to provider.bzl. Improve readability of clippy_failure_test.sh
11 files changed
tree: edde25ea01056434f5680ac3e621988be8617e7d
  1. .bazelci/
  2. .github/
  3. bindgen/
  4. cargo/
  5. crate_universe/
  6. docs/
  7. examples/
  8. proto/
  9. rust/
  10. test/
  11. tools/
  12. util/
  13. wasm_bindgen/
  14. .bazelignore
  15. .bazelrc
  16. .gitignore
  17. ARCHITECTURE.md
  18. AUTHORS
  19. BUILD.bazel
  20. CODEOWNERS
  21. COMPATIBILITY.md
  22. CONTRIBUTING.md
  23. CONTRIBUTORS
  24. LICENSE.txt
  25. README.md
  26. WORKSPACE.bazel
  27. workspace.bzl
README.md

Rust Rules

  • Postsubmit Build status

Overview

This repository provides rules for building Rust projects with Bazel.

Community

General discussions and announcements take place in the GitHub Discussions, but there are additional places where community members gather to discuss rules_rust.

Documentation

Please refer to the full documentation.