diff --git a/.hlint.yaml b/.hlint.yaml index 9205d4fb1..4e75cf173 100644 --- a/.hlint.yaml +++ b/.hlint.yaml @@ -15,6 +15,8 @@ - ignore: {name: "Use list comprehension"} - ignore: {name: "Use fewer imports"} +# - ignore: {name: Redundant <&>, within: Hledger.Read.Common.journalFinalise} + # Specify additional command line arguments # diff --git a/hledger-lib/Hledger/Data/Dates.hs b/hledger-lib/Hledger/Data/Dates.hs index 298a13029..d63ec678f 100644 --- a/hledger-lib/Hledger/Data/Dates.hs +++ b/hledger-lib/Hledger/Data/Dates.hs @@ -1,7 +1,6 @@ {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE NoMonoLocalBinds #-} {-# LANGUAGE OverloadedStrings #-} -{-# LANGUAGE PackageImports #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE TupleSections #-} {-# LANGUAGE TypeFamilies #-} diff --git a/hledger-lib/Hledger/Read/Common.hs b/hledger-lib/Hledger/Read/Common.hs index 8846ac4cb..f288c19f7 100644 --- a/hledger-lib/Hledger/Read/Common.hs +++ b/hledger-lib/Hledger/Read/Common.hs @@ -286,6 +286,8 @@ parseAndFinaliseJournal' parser iopts f txt = do Left e -> throwError e Right pj' -> journalFinalise iopts f txt pj' +{- HLINT ignore journalFinalise "Redundant <&>" -} -- silence this warning, the code is clearer as is +-- NB activates TH, may slow compilation ? https://github.com/ndmitchell/hlint/blob/master/README.md#customizing-the-hints -- | Post-process a Journal that has just been parsed or generated, in this order: -- -- - add misc info (file path, read time) diff --git a/hledger-lib/Text/Megaparsec/Custom.hs b/hledger-lib/Text/Megaparsec/Custom.hs index 948e8be74..436cba927 100644 --- a/hledger-lib/Text/Megaparsec/Custom.hs +++ b/hledger-lib/Text/Megaparsec/Custom.hs @@ -3,7 +3,6 @@ {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE FlexibleInstances #-} -- new {-# LANGUAGE LambdaCase #-} -{-# LANGUAGE PackageImports #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE StandaloneDeriving #-} -- new