add subcommand lint_haskell to lint haskell code

This commit is contained in:
fanghr 2022-05-03 19:45:49 +08:00
parent 15fd232874
commit 0f8bc9e9f8
No known key found for this signature in database
GPG key ID: 35CD9A71CD5D5870

View file

@ -14,6 +14,7 @@ usage:
@echo " format_haskell -- Format haskell stuff, including source code and cabal files"
@echo " format_nix -- Format *.nix files only"
@echo " format_check -- Check if all haskell stuff have been formatted correctly"
@echo " lint_haskell -- run hlint on all haskell files"
hoogle:
pkill hoogle || true
@ -37,6 +38,9 @@ format_check:
-not -path './haddock/*' \
| xargs fourmolu $(FORMAT_EXTENSIONS) -m check
lint_haskell:
find -name '*.hs' -not -path './dist*/*' -not -path './haddock/*' | xargs hlint
haddock:
cabal haddock --haddock-html --haddock-hoogle --builddir=haddock