Skip to content

Commit

Permalink
ci: fix clippy check
Browse files Browse the repository at this point in the history
  • Loading branch information
getchoo committed Nov 9, 2024
1 parent 3895755 commit b0fb19d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/clippy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ jobs:
- name: Run clippy
id: clippy-run
run: |
nix build --print-build-logs .#check-clippy
nix build --print-build-logs .#checks.x86_64-linux.clippy
[ -L result ] || exit 1
echo "sarif-file=$(readlink -f result)" >> "$GITHUB_OUTPUT"
Expand Down
10 changes: 7 additions & 3 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -41,12 +41,15 @@
'';
in
lib.optionalAttrs (lib.elem system supportedSystems) {
clippy = packages.nix-forecast.overrideAttrs (oldAttrs: {
clippy = packages.nix-forecast.overrideAttrs {
pname = "check-clippy";

nativeBuildInputs = oldAttrs.nativeBuildInputs or [ ] ++ [
nativeBuildInputs = [
pkgs.cargo
pkgs.clippy
pkgs.clippy-sarif
pkgs.rustPlatform.cargoSetupHook
pkgs.rustc
pkgs.sarif-fmt
];

Expand All @@ -63,11 +66,12 @@

dontInstall = true;
doCheck = false;
doInstallCheck = false;
dontFixup = true;

passthru = { };
meta = { };
});
};

rustfmt = mkCheck "check-cargo-fmt" [
pkgs.cargo
Expand Down

0 comments on commit b0fb19d

Please sign in to comment.