nix: Add weeder to postgrest-coverage
Removes a bit of dead code from SpecHelper.hs
This commit is contained in:
committed by
Steve Chavez
parent
9b397878dc
commit
7940e73a12
@@ -5,6 +5,7 @@
|
||||
, devCabalOptions
|
||||
, entr
|
||||
, graphviz
|
||||
, haskellPackages
|
||||
, hsie
|
||||
, nix
|
||||
, silver-searcher
|
||||
|
||||
+4
-2
@@ -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} \
|
||||
|
||||
Reference in New Issue
Block a user