From 6cd77d4c638012be63d66882403804aa28feb6ed Mon Sep 17 00:00:00 2001 From: Albert Krewinkel Date: Fri, 7 Feb 2020 10:15:57 +0100 Subject: Resolve HLint warnings All warnings are either fixed or, if more appropriate, HLint is configured to ignore them. HLint suggestions remain. * Ignore "Use camelCase" warnings in Lua and legacy code * Fix or ignore remaining HLint warnings * Remove redundant brackets * Remove redundant `return`s * Remove redundant as-pattern * Fuse mapM_/map * Use `.` to shorten code * Remove redundant `fmap` * Remove unused LANGUAGE pragmas * Hoist `not` in Text.Pandoc.App * Use fewer imports for `Text.DocTemplates` * Remove redundant `do`s * Remove redundant `$`s * Jira reader: remove unnecessary parentheses --- .hlint.yaml | 31 ++++++++++++++++++++++--------- 1 file changed, 22 insertions(+), 9 deletions(-) (limited to '.hlint.yaml') diff --git a/.hlint.yaml b/.hlint.yaml index def675e77..cc4ee4fea 100644 --- a/.hlint.yaml +++ b/.hlint.yaml @@ -55,18 +55,31 @@ # - ignore: {name: "Use list comprehension"} # - ignore: {name: "Redundant if"} - ignore: {name: "Avoid lambda"} -- ignore: {name: "Use String"} -- ignore: {name: "Use isDigit"} - ignore: {name: "Eta reduce"} -- ignore: {name: "Use fmap"} # specific for GHC 7.8 compat -- ignore: {name: "Parse error"} # we trust the compiler over HLint -- ignore: {name: "Use =="} # Creates infinite loops in `EQ` using expressions - ignore: {name: "Evaluate"} +- ignore: {name: "Monad law, left identity", module: "Text.Pandoc.App.OutputSettings"} +- ignore: {name: "Parse error"} # we trust the compiler over HLint +- ignore: {name: "Reduce duplication", module: "Text.Pandoc.Readers.Markdown"} - ignore: {name: "Use &&&"} -# - ignore: {name: "Redundant compare"} +- ignore: {name: "Use =="} # Creates infinite loops in `EQ` using expressions +- ignore: {name: "Use String"} +- ignore: {name: "Use fmap"} # specific for GHC 7.8 compat +- ignore: {name: "Use forM_", module: "Text.Pandoc.Readers.DocBook"} +- ignore: {name: "Use isDigit"} +- ignore: {name: "Use tuple-section", module: "Text.Pandoc.Readers.EPUB"} +- ignore: {name: "Use uncurry", module: "Text.Pandoc.Readers.Docx.Combine"} +- ignore: + name: "Use <$>" + within: + - Text.Pandoc.Readers.LaTeX + - Text.Pandoc.Readers.Markdown +- ignore: + name: "Use camelCase" + within: + - Text.Pandoc.Extensions + - Text.Pandoc.Lua.Marshalling.Version + - Text.Pandoc.Readers.Odt.ContentReader + - Text.Pandoc.Readers.Odt.Namespaces # Define some custom infix operators # - fixity: infixr 3 ~^#^~ - - - -- cgit v1.2.3