Also style-check Lua (#39)

This commit is contained in:
Patrick Stevens
2024-03-26 00:15:10 +00:00
committed by GitHub
parent 87492c2abe
commit 010498edce

View File

@@ -119,11 +119,12 @@
pkgs.stdenvNoCC.mkDerivation {
name = "fmt-check";
src = ./.;
nativeBuildInputs = [pkgs.alejandra pkgs.shellcheck pkgs.shfmt];
nativeBuildInputs = [pkgs.alejandra pkgs.shellcheck pkgs.shfmt pkgs.stylua];
checkPhase = ''
find . -type f -name '*.sh' | xargs shfmt -d -s -i 2 -ci
alejandra -c .
find . -type f -name '*.sh' -exec shellcheck -x {} \;
find . -type f -name '*.lua' -exec stylua --check {} \;
'';
installPhase = "mkdir $out";
dontBuild = true;
@@ -141,7 +142,7 @@
pkgs = import nixpkgs {inherit config system;};
in {
default = pkgs.mkShell {
buildInputs = [pkgs.alejandra pkgs.shellcheck];
buildInputs = [pkgs.alejandra pkgs.shellcheck pkgs.stylua];
};
}
);