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:
Executable
+12
@@ -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
|
||||
Reference in New Issue
Block a user