From 72bc65b2ab3d2db6caf86af07ec0d4ace5e96982 Mon Sep 17 00:00:00 2001 From: Ana Hobden Date: Mon, 14 Aug 2023 10:00:34 -0700 Subject: [PATCH] Enable clippy on CI (#574) * Enable clippy on CI * Use rustc in check-clippy... --- .github/workflows/ci.yml | 2 ++ flake.nix | 1 + nix/check.nix | 9 +++++++++ 3 files changed, 12 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7838c9a..683e4e1 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -21,6 +21,8 @@ jobs: - uses: DeterminateSystems/magic-nix-cache-action@main - name: Check rustfmt run: nix develop --command check-rustfmt + - name: Check Clippy + run: nix develop --command check-clippy - name: Check Spelling run: nix develop --command check-spelling - name: Check nixpkgs-fmt formatting diff --git a/flake.nix b/flake.nix index 23afca9..ee934a2 100644 --- a/flake.nix +++ b/flake.nix @@ -144,6 +144,7 @@ check.check-nixpkgs-fmt check.check-editorconfig check.check-semver + check.check-clippy ] ++ lib.optionals (pkgs.stdenv.isDarwin) (with pkgs; [ libiconv diff --git a/nix/check.nix b/nix/check.nix index 6c1d6e4..1ca0918 100644 --- a/nix/check.nix +++ b/nix/check.nix @@ -50,4 +50,13 @@ in cargo-semver-checks semver-checks check-release ''; }); + # Clippy + check-clippy = (writeShellApplication { + name = "check-clippy"; + runtimeInputs = with pkgs; [ cargo clippy rustc ]; + text = '' + cargo clippy + ''; + }); + }