mirror of
https://github.com/Gerg-L/nixos.git
synced 2025-12-10 08:53:56 -05:00
16 lines
239 B
Bash
Executable file
16 lines
239 B
Bash
Executable file
#!/usr/bin/env bash
|
|
|
|
STAGED="$(git diff --name-only --cached | grep "**.nix" | tr '\n' ' ')"
|
|
|
|
if [ -z "$STAGED" ]; then
|
|
exit 0
|
|
fi
|
|
|
|
for i in $STAGED; do
|
|
statix fix -- "$i"
|
|
done
|
|
|
|
deadnix -qe $STAGED
|
|
alejandra -q $STAGED
|
|
|
|
git add $STAGED
|