nix: Add deadnix to postgrest-lint and remove dead nix code
This commit is contained in:
@@ -5,9 +5,7 @@
|
||||
, devCabalOptions
|
||||
, entr
|
||||
, git
|
||||
, gnugrep
|
||||
, graphviz
|
||||
, haskellPackages
|
||||
, hsie
|
||||
, nix
|
||||
, silver-searcher
|
||||
|
||||
+4
-1
@@ -2,6 +2,7 @@
|
||||
, black
|
||||
, buildToolbox
|
||||
, checkedShellScript
|
||||
, deadnix
|
||||
, git
|
||||
, hlint
|
||||
, hsie
|
||||
@@ -65,10 +66,12 @@ let
|
||||
echo "Linting workflows..."
|
||||
${actionlint}/bin/actionlint
|
||||
|
||||
echo "Scanning nix files for unused code..."
|
||||
${deadnix}/bin/deadnix
|
||||
|
||||
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$' . \
|
||||
|
||||
+1
-29
@@ -1,10 +1,6 @@
|
||||
{ bash-completion
|
||||
, buildToolbox
|
||||
, cabal-install
|
||||
, cabalTools
|
||||
{ buildToolbox
|
||||
, checkedShellScript
|
||||
, curl
|
||||
, devCabalOptions
|
||||
, git
|
||||
, lib
|
||||
, postgresqlVersions
|
||||
@@ -276,30 +272,6 @@ let
|
||||
log-level="$(PGRST_LOG_LEVEL)"
|
||||
'';
|
||||
|
||||
waitForPgrstPid =
|
||||
checkedShellScript
|
||||
{
|
||||
name = "postgrest-wait-for-pgrst-pid";
|
||||
docs = "Wait for PostgREST to be running. Needs to be a separate command for timeout to work below.";
|
||||
args = [
|
||||
"ARG_USE_ENV([PGRST_SERVER_UNIX_SOCKET], [], [Unix socket to check for running PostgREST instance])"
|
||||
];
|
||||
}
|
||||
''
|
||||
# ARG_USE_ENV only adds defaults or docs for environment variables
|
||||
# We manually implement a required check here
|
||||
# See also: https://github.com/matejak/argbash/issues/80
|
||||
: "''${PGRST_SERVER_UNIX_SOCKET:?PGRST_SERVER_UNIX_SOCKET is required}"
|
||||
|
||||
until [ -S "$PGRST_SERVER_UNIX_SOCKET" ]
|
||||
do
|
||||
sleep 0.1
|
||||
done
|
||||
|
||||
# return pid of postgrest process
|
||||
lsof -t -c '/^postgrest$/' "$PGRST_SERVER_UNIX_SOCKET"
|
||||
'';
|
||||
|
||||
waitForPgrstReady =
|
||||
checkedShellScript
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user