added pre and post commit hooks to run linting
This commit is contained in:
parent
c236668389
commit
52ae2ef47d
3 changed files with 17 additions and 0 deletions
3
hooks/post-commit
Executable file
3
hooks/post-commit
Executable file
|
@ -0,0 +1,3 @@
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
git stash pop -q
|
11
hooks/pre-commit
Executable file
11
hooks/pre-commit
Executable file
|
@ -0,0 +1,11 @@
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
git stash -q --keep-index
|
||||||
|
|
||||||
|
./lint.sh
|
||||||
|
|
||||||
|
RESULT=$?
|
||||||
|
|
||||||
|
git add -u
|
||||||
|
|
||||||
|
exit $RESULT
|
3
lint.sh
Executable file
3
lint.sh
Executable file
|
@ -0,0 +1,3 @@
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
nix run git+https://github.com/kamadorueda/alejandra -- -q .
|
Loading…
Add table
Add a link
Reference in a new issue