Skip to content

Commit

Permalink
flake: check shell script formatting with shfmt
Browse files Browse the repository at this point in the history
  • Loading branch information
nothingmuch committed Jan 3, 2025
1 parent 548118a commit 850dda1
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,15 @@
alejandra -c .
'';
};

shfmt = simpleCheck rec {
name = "shell-checks";
src = pkgs.lib.sources.sourceFilesBySuffices ./. [".sh"];
nativeBuildInputs = [pkgs.shfmt];
checkPhase = ''
shfmt -d -s -i 4 -ci ${src}
'';
};
};
}
);
Expand Down

0 comments on commit 850dda1

Please sign in to comment.