Add fourmolu + hlint with scripts and git hooks (Atlas-style)

- Create scripts/build, scripts/test, scripts/run, scripts/install-hooks
- Create git-hooks/pre-commit (auto-format staged .hs files)
- Create git-hooks/pre-push (check formatting + hlint before push)
- Handle git worktrees correctly in hook installation
- Run fourmolu on all source files to fix existing formatting
This commit is contained in:
2026-05-18 22:24:59 -04:00
parent 235adce596
commit 9759a4c3a3
10 changed files with 278 additions and 148 deletions
Executable
+12
View File
@@ -0,0 +1,12 @@
#!/usr/bin/env bash
set -euo pipefail
cd "$(dirname "${BASH_SOURCE[0]}")/.."
echo "Formatting with fourmolu..."
./hs fourmolu --mode inplace app/ src/ test/
echo "Linting with hlint..."
./hs hlint app/ src/ test/
echo "Building..."
./hs stack build --copy-bins --local-bin-path /work/build