clippy.sh 1.1 KB

1234567891011121314151617181920
  1. #!/usr/bin/env sh
  2. set -eux
  3. # We cannot run clippy over the whole workspace at once due to feature unification. Since both
  4. # integration-test and integration-ebpf depend on integration-common and integration-test activates
  5. # integration-common's aya dependency, we end up trying to compile the panic handler twice: once
  6. # from the bpf program, and again from std via aya.
  7. #
  8. # `-C panic=abort` because "unwinding panics are not supported without std"; integration-ebpf
  9. # contains `#[no_std]` binaries.
  10. #
  11. # `-Zpanic_abort_tests` because "building tests with panic=abort is not supported without
  12. # `-Zpanic_abort_tests`"; Cargo does this automatically when panic=abort is set via profile but we
  13. # want to preserve unwinding at runtime - here we are just running clippy so we don't care about
  14. # unwinding behavior.
  15. #
  16. # `+nightly` because "the option `Z` is only accepted on the nightly compiler".
  17. cargo +nightly hack clippy "$@" --exclude integration-ebpf --all-targets --feature-powerset --workspace -- --deny warnings
  18. cargo +nightly hack clippy "$@" --package integration-ebpf --all-targets --feature-powerset -- --deny warnings -C panic=abort -Zpanic_abort_tests