flake: run tests in flake check, actually check fourmolu

This commit is contained in:
Emily Martins 2022-03-22 16:27:20 +01:00
parent d8aa028814
commit bb174a7145
3 changed files with 15 additions and 12 deletions

View file

@ -1,4 +1,5 @@
SHELL := /usr/bin/env bash
# This really ought to be `/usr/bin/env bash`, but nix flakes don't like that.
SHELL := /bin/sh
.PHONY: hoogle format haddock usage
@ -10,7 +11,7 @@ usage:
@echo " format -- Format the project"
@echo " haddock -- Generate Haddock docs for project"
hoogle:
hoogle:
hoogle generate --local=haddock --database=hoo/local.hoo
hoogle server --local -p 8081 >> /dev/null &
hoogle server --local --database=hoo/local.hoo -p 8082 >> /dev/null &
@ -21,5 +22,8 @@ format:
git ls-tree -r HEAD --full-tree --name-only | grep -E '.*\.nix' | xargs nixfmt
git ls-tree -r HEAD --full-tree --name-only | grep -E '.*\.cabal' | xargs cabal-fmt -i
format_check:
find -name '*.hs' -not -path './dist-*/*' | xargs fourmolu $(FORMAT_EXTENSIONS) -m check
haddock:
cabal haddock --haddock-html --haddock-hoogle --builddir=haddock