Skip to content

Commit 6b81e28

Browse files
committed
style: improve stylua hook formatting for readability
1 parent 05f6019 commit 6b81e28

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

.pre-commit-config.yaml

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,17 @@ repos:
6464
name: stylua
6565
description: Format Lua code with StyLua
6666
entry: bash
67-
args: [-c, 'if [ "$CI" = "true" ]; then echo "Skipping stylua in CI"; exit 0; elif command -v nix >/dev/null 2>&1; then nix --extra-experimental-features "nix-command flakes" shell nixpkgs#stylua -c stylua "$@"; else echo "Skipping stylua (Nix not available)"; fi', --]
67+
args:
68+
- -c
69+
- |
70+
if [ "$CI" = "true" ]; then
71+
echo "Skipping stylua in CI"
72+
exit 0
73+
elif command -v nix >/dev/null 2>&1; then
74+
nix --extra-experimental-features "nix-command flakes" shell nixpkgs#stylua -c stylua "$@"
75+
else
76+
echo "Skipping stylua (Nix not available)"
77+
fi
78+
- --
6879
language: system
6980
files: \.lua$

0 commit comments

Comments
 (0)