nix: Add weeder to postgrest-coverage

Removes a bit of dead code from SpecHelper.hs
This commit is contained in:
Wolfgang Walther
2022-06-03 22:19:16 -05:00
committed by Steve Chavez
parent 9b397878dc
commit 7940e73a12
5 changed files with 14 additions and 16 deletions
+1
View File
@@ -5,6 +5,7 @@
, devCabalOptions
, entr
, graphviz
, haskellPackages
, hsie
, nix
, silver-searcher
+4 -2
View File
@@ -5,7 +5,7 @@
, ghc
, glibcLocales
, gnugrep
, haskell
, haskellPackages
, hpc-codecov
, jq
, postgrest
@@ -116,7 +116,7 @@ let
checkedShellScript
{
name = "postgrest-coverage";
docs = "Run spec and io tests while collecting hpc coverage data.";
docs = "Run spec and io tests while collecting hpc coverage data. First runs weeder to detect dead code.";
args = [ "ARG_LEFTOVERS([hpc report arguments])" ];
inRootDir = true;
redirectTixFiles = false;
@@ -133,6 +133,8 @@ let
# build once before running all the tests
${cabal-install}/bin/cabal v2-build ${devCabalOptions} exe:postgrest lib:postgrest test:spec test:querycost
${haskellPackages.weeder}/bin/weeder --config=./test/weeder.dhall || echo Found dead code: Check file list above.
# collect all tests
HPCTIXFILE="$tmpdir"/io.tix \
${withTools.withPg} ${cabal-install}/bin/cabal v2-exec ${devCabalOptions} \