nix: Hook hsie check-aliases into postgrest-lint
This commit is contained in:
+1
-1
@@ -138,7 +138,7 @@ rec {
|
|||||||
|
|
||||||
# Linting and styling tools.
|
# Linting and styling tools.
|
||||||
style =
|
style =
|
||||||
pkgs.callPackage nix/tools/style.nix { };
|
pkgs.callPackage nix/tools/style.nix { inherit hsie; };
|
||||||
|
|
||||||
# Scripts for running tests.
|
# Scripts for running tests.
|
||||||
tests =
|
tests =
|
||||||
|
|||||||
+7
-2
@@ -3,6 +3,7 @@
|
|||||||
, checkedShellScript
|
, checkedShellScript
|
||||||
, git
|
, git
|
||||||
, hlint
|
, hlint
|
||||||
|
, hsie
|
||||||
, nixpkgs-fmt
|
, nixpkgs-fmt
|
||||||
, shellcheck
|
, shellcheck
|
||||||
, silver-searcher
|
, silver-searcher
|
||||||
@@ -53,12 +54,16 @@ let
|
|||||||
inRootDir = true;
|
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
|
# --vimgrep fixes a bug in ag: https://github.com/ggreer/the_silver_searcher/issues/753
|
||||||
${silver-searcher}/bin/ag -l --vimgrep -g '\.l?hs$' . \
|
${silver-searcher}/bin/ag -l --vimgrep -g '\.l?hs$' . \
|
||||||
| xargs ${hlint}/bin/hlint -X QuasiQuotes -X NoPatternSynonyms
|
| xargs ${hlint}/bin/hlint -X QuasiQuotes -X NoPatternSynonyms
|
||||||
|
|
||||||
# Lint bash scripts
|
echo "Linting bash scripts..."
|
||||||
${shellcheck}/bin/shellcheck test/with_tmp_db
|
${shellcheck}/bin/shellcheck test/with_tmp_db
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user