Commit 77bb125a authored by Yuanle Song's avatar Yuanle Song
Browse files

add a hlint hint to ignore one hint; add git-hooks/ dir

in updateRDConfigFromEnvPure
parent ae4aea19
Loading
Loading
Loading
Loading

git-hooks/pre-commit

0 → 100755
+4 −0
Original line number Diff line number Diff line
#!/bin/sh
set -e
stack build --test
stack exec hlint -- -g || true
+1 −0
Original line number Diff line number Diff line
@@ -35,6 +35,7 @@ parseIntEnv key env =
                  [(i, [])] -> Right $ Just i
                  _ -> Left $ "failed to parse " <> T.pack key <> " from env variable: " <> T.pack s

{-# ANN updateRDConfigFromEnvPure ("HLint: ignore Use =<<" :: String) #-}
updateRDConfigFromEnvPure :: [(String, String)] -> RDConfig -> Either T.Text RDConfig
updateRDConfigFromEnvPure env c0 =
  (\c -> Right $ maybe c (\h -> c { host=h }) (lookup "HOST" env)) c0 >>=