on master help sign in
Lint cleanup
commit95436017896c926c94d78513eb9b57124296ae9e authorElliot Cameron <eacameron@gmail.com> dateTue 24 Dec 2019, 23:53 (7 years ago) parent69bd563
6 files changed+8−8
lib/command/src/Obelisk/Command/Nix.hs+1−1 lib/command/src/Obelisk/Command/Project.hs+1−1 lib/command/src/Obelisk/Command/Run.hs+1−1 lib/command/src/Obelisk/Command/Thunk.hs+1−1 lib/command/src/Obelisk/Command/Utils.hs+3−3 lib/run/src/Obelisk/Run.hs+1−1
lib/command/src/Obelisk/Command/Nix.hs+1−1
@@ -160,7 +160,7 @@ instance Default NixCmd where
160160
161161nixCmd :: MonadObelisk m => NixCmd -> m FilePath
162162nixCmd cmdCfg = withSpinner' ("Running " <> cmd <> desc) (Just $ const $ "Built " <> desc) $ do
163− output <- readProcessAndLogStderr Debug $ proc (T.unpack cmd) $ options
163+ output <- readProcessAndLogStderr Debug $ proc (T.unpack cmd) options
164164 -- Remove final newline that Nix appends
165165 Just (outPath, '\n') <- pure $ T.unsnoc output
166166 pure $ T.unpack outPath
lib/command/src/Obelisk/Command/Project.hs+1−1
@@ -169,7 +169,7 @@ findProjectRoot :: MonadObelisk m => FilePath -> m (Maybe FilePath)
169169findProjectRoot target = do
170170 myUid <- liftIO getRealUserID
171171 targetStat <- liftIO $ getFileStatus target
172− umask <- liftIO $ getUmask
172+ umask <- liftIO getUmask
173173 (result, _) <- liftIO $ runStateT (walkToProjectRoot target targetStat umask myUid) []
174174 return result
175175
lib/command/src/Obelisk/Command/Run.hs+1−1
@@ -254,4 +254,4 @@ getFreePort = liftIO $ withSocketsDo $ do
254254 open addr = do
255255 sock <- socket (addrFamily addr) (addrSocketType addr) (addrProtocol addr)
256256 bind sock (addrAddress addr)
257− return sock
257+ return sock
lib/command/src/Obelisk/Command/Thunk.hs+1−1
@@ -726,7 +726,7 @@ getThunkPtr checkClean thunkDir = do
726726 <$> T.lines
727727 <$> readGitProcess thunkDir ["rev-parse", "HEAD"]
728728 case b of
729− (Just "HEAD") -> failWith $ T.unlines $
729+ (Just "HEAD") -> failWith $ T.unlines
730730 [ "thunk pack: You are in 'detached HEAD' state."
731731 , "If you want to pack at the current ref \
732732 \then please create a new branch with 'git checkout -b <new-branch-name>' and push this upstream."
lib/command/src/Obelisk/Command/Utils.hs+3−3
@@ -130,13 +130,13 @@ gitLsRemote repository mRef mBranch = do
130130 (exitCode, out, _err) <- case mBranch of
131131 Nothing -> readCreateProcessWithExitCode $ gitProcNoRepo $
132132 ["ls-remote", "--exit-code", "--symref", repository]
133− ++ (maybeToList $ T.unpack . showGitRef <$> mRef)
134− Just branchName -> readCreateProcessWithExitCode $ gitProcNoRepo $
133+ ++ maybeToList (T.unpack . showGitRef <$> mRef)
134+ Just branchName -> readCreateProcessWithExitCode $ gitProcNoRepo
135135 ["ls-remote", "--exit-code", repository, branchName]
136136 let t = T.pack out
137137 maps <- case MP.runParser parseLsRemote "" t of
138138 Left err -> failWith $ T.pack $ MP.errorBundlePretty err
139− Right table -> pure $ bimap M.fromList M.fromList $ partitionEithers $ table
139+ Right table -> pure $ bimap M.fromList M.fromList $ partitionEithers table
140140 putLog Debug $ "git ls-remote maps: " <> T.pack (show maps)
141141 pure (exitCode, maps)
142142
lib/run/src/Obelisk/Run.hs+1−1
@@ -129,7 +129,7 @@ runWidget conf configs frontend validFullEncoder = do
129129 putStrLn $ "Frontend running on " <> T.unpack (URI.render uri)
130130 settings = setBeforeMainLoop beforeMainLoop (setPort port (setTimeout 3600 defaultSettings))
131131 -- Providing TLS here will also incidentally provide it to proxied requests to the backend.
132− prepareRunner = case (uri ^? uriScheme . _Just . unRText) of
132+ prepareRunner = case uri ^? uriScheme . _Just . unRText of
133133 Just "https" -> do
134134 -- Generate a private key and self-signed certificate for TLS
135135 privateKey <- RSA.generateRSAKey' 2048 3