| 1 | #!/usr/bin/env nix-shell |
| 2 | #!nix-shell -i bash ../../shell.nix |
| 3 | #shellcheck shell=bash |
| 4 | |
| 5 | set -eux |
| 6 | |
| 7 | failed=0 |
| 8 | |
| 9 | if ! git ls-files '*.md' '*.yaml' '*.yml' | xargs prettier --list-different --write; then |
| 10 | failed=1 |
| 11 | fi |
| 12 | |
| 13 | if ! shfmt -f . | xargs shfmt -l -d; then |
| 14 | failed=1 |
| 15 | fi |
| 16 | |
| 17 | if ! nixfmt shell.nix; then |
| 18 | failed=1 |
| 19 | fi |
| 20 | |
| 21 | if ! rufo Vagrantfile; then |
| 22 | failed=1 |
| 23 | fi |
| 24 | |
| 25 | if ! git diff | (! grep .); then |
| 26 | failed=1 |
| 27 | fi |
| 28 | |
| 29 | exit "$failed" |