-
Notifications
You must be signed in to change notification settings - Fork 116
Expand file tree
/
Copy pathlefthook.yml
More file actions
25 lines (24 loc) · 950 Bytes
/
lefthook.yml
File metadata and controls
25 lines (24 loc) · 950 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
pre-commit:
parallel: true
commands:
fourmolu:
glob: "*.hs"
run: "command -v fourmolu > /dev/null && fourmolu --mode check {staged_files} || echo 'fourmolu not found (run: nix develop)'"
hlint:
glob: "*.hs"
run: "command -v hlint > /dev/null && hlint {staged_files} || echo 'hlint not found (run: nix develop)'"
shellcheck:
glob: "*.sh"
run: "command -v shellcheck > /dev/null && shellcheck {staged_files} || echo 'shellcheck not found (run: nix develop)'"
shfmt:
glob: "*.sh"
run: "command -v shfmt > /dev/null && shfmt -d {staged_files} || echo 'shfmt not found (run: nix develop)'"
pre-push:
parallel: true
commands:
cabal-build-and-test:
glob: "*.{hs,cabal}"
run: "cabal v2-build --ghc-options=-Werror 2>&1 && cabal v2-test 2>&1"
nix-check:
glob: "*.{hs,nix,cabal}"
run: "nix flake check --no-warn-dirty --allow-import-from-derivation 2>&1"