feat(tvix): add clippy target in CI

This will invoke `cargo clippy` on the codebase, ensuring we spot things
early on.

Relates to b/321.

Change-Id: Ifba13e5bef995d33b24346c6cee134e84d6566c4
Reviewed-on: https://cl.tvl.fyi/c/depot/+/9106
Tested-by: BuildkiteCI
Autosubmit: flokli <flokli@flokli.de>
Reviewed-by: tazjin <tazjin@tvl.su>
This commit is contained in:
Florian Klink 2023-08-19 17:09:11 +02:00 committed by flokli
parent f325456cba
commit a9329ff811

View file

@ -131,7 +131,31 @@ in
''; '';
}; };
# Run cargo clippy. We run it with -Dwarnings, so warnings cause a nonzero
# exit code.
clippy = pkgs.stdenv.mkDerivation {
inherit cargoDeps;
name = "tvix-clippy";
src = depot.third_party.gitignoreSource ./.;
PROTO_ROOT = depot.tvix.proto;
buildInputs = [
pkgs.fuse
];
nativeBuildInputs = with pkgs; [
cargo
clippy
pkg-config
protobuf
rustc
rustPlatform.cargoSetupHook
];
buildPhase = "cargo clippy -- -Dwarnings | tee $out";
};
meta.ci.targets = [ meta.ci.targets = [
"clippy"
"shell" "shell"
"rust-docs" "rust-docs"
]; ];