nix: Hook hsie check-aliases into postgrest-lint

This commit is contained in:
monacoremo
2021-11-05 08:08:00 +01:00
committed by Remo
parent d16a4a9a2b
commit 71262fbc5c
2 changed files with 8 additions and 3 deletions
+1 -1
View File
@@ -138,7 +138,7 @@ rec {
# Linting and styling tools.
style =
pkgs.callPackage nix/tools/style.nix { };
pkgs.callPackage nix/tools/style.nix { inherit hsie; };
# Scripts for running tests.
tests =
+7 -2
View File
@@ -3,6 +3,7 @@
, checkedShellScript
, git
, hlint
, hsie
, nixpkgs-fmt
, shellcheck
, silver-searcher
@@ -53,12 +54,16 @@ let
inRootDir = true;
}
''
# Lint Haskell files
echo "Checking consistency of import aliases in Haskell code..."
${hsie} check-aliases main src
echo "Linting Haskell files..."
# --vimgrep fixes a bug in ag: https://github.com/ggreer/the_silver_searcher/issues/753
${silver-searcher}/bin/ag -l --vimgrep -g '\.l?hs$' . \
| xargs ${hlint}/bin/hlint -X QuasiQuotes -X NoPatternSynonyms
# Lint bash scripts
echo "Linting bash scripts..."
${shellcheck}/bin/shellcheck test/with_tmp_db
'';