diff --git a/.hlint.yaml b/.hlint.yaml index d837e6ad8..67f2c02a9 100644 --- a/.hlint.yaml +++ b/.hlint.yaml @@ -16,7 +16,6 @@ - ignore: {name: "Use <$>"} - ignore: {name: "Unused LANGUAGE pragma"} - ignore: {name: "Redundant bracket"} -- ignore: {name: "Redundant guard"} - ignore: {name: "Avoid reverse"} - ignore: {name: "Eta reduce"} - ignore: {name: "Use $>"} diff --git a/Shake.hs b/Shake.hs index 355a5dbcc..a7c453022 100755 --- a/Shake.hs +++ b/Shake.hs @@ -663,9 +663,9 @@ main = do -- With -n/--dry-run, print new content to stdout instead of -- updating the changelog. -- - phonys (\out -> if - | not $ out `elem` changelogs -> Nothing - | otherwise -> Just $ do + phonys (\out -> if out `notElem` changelogs + then Nothing + else Just $ do tags <- lines . fromStdout <$> (cmd Shell "git tag" :: Action (Stdout String)) oldlines <- liftIO $ lines <$> readFileStrictly out let diff --git a/bin/_hledger-chart.hs b/bin/_hledger-chart.hs index f0601c32d..5dd0c5ce6 100755 --- a/bin/_hledger-chart.hs +++ b/bin/_hledger-chart.hs @@ -100,7 +100,7 @@ main = do let balreport = balanceReportFromMultiBalanceReport ropts (queryFromOpts d ropts) j let go -- | "--help" `elem` (rawopts_ $ cliopts_ chopts) = putStr (showModeHelp chartmode) >> exitSuccess -- | "--version" `elem` (rawopts_ $ cliopts_ chopts) = putStrLn progversion >> exitSuccess - | otherwise = withJournalAndChartOptsDo chopts (writeChart balreport) + = withJournalAndChartOptsDo chopts (writeChart balreport) go -- copied from hledger-web diff --git a/bin/hledger-smooth.hs b/bin/hledger-smooth.hs index c61c965c5..33679b4e3 100755 --- a/bin/hledger-smooth.hs +++ b/bin/hledger-smooth.hs @@ -89,7 +89,7 @@ splitTransactionPostings :: Query -> AccountName -> [Day] -> Transaction -> ([Da splitTransactionPostings _q acct dates t -- | q `matchesTransaction` t = (dates', t') -- | otherwise = (dates, t) - | otherwise = (dates', t') + = (dates', t') where (dates', pss') = mapAccumL (splitPosting acct) dates $ tpostings t t' = txnTieKnot t{tpostings=concat pss'}