Add scripts for linting and styling with all dependencies managed by Nix (#1501)

* Integrate the style and lint dependencies with Nix

* Add documentation on the nix styling scripts.
This commit is contained in:
Remo
2020-04-27 15:04:50 -05:00
committed by GitHub
parent ad92c207f2
commit dbc3aa28c4
5 changed files with 71 additions and 0 deletions
+12
View File
@@ -0,0 +1,12 @@
{ writeShellScriptBin, git, silver-searcher, hlint }:
writeShellScriptBin "postgrest-lint"
''
set -euo pipefail
rootdir="$(${git}/bin/git rev-parse --show-toplevel)"
# Lint Haskell files
${silver-searcher}/bin/ag -l -g '\.l?hs$' "$rootdir" \
| xargs ${hlint}/bin/hlint -X QuasiQuotes -X NoPatternSynonyms
''