hlint options can be specified from ghc-hlint-options.

This commit is contained in:
Kazu Yamamoto
2010-06-14 11:56:35 +09:00
parent da8975c03f
commit f30eb343b0
5 changed files with 25 additions and 8 deletions

View File

@@ -6,9 +6,9 @@ import Language.Haskell.HLint
import Types
lintSyntax :: Options -> String -> IO String
lintSyntax _ file = pretty <$> lint file
lintSyntax opt file = pretty <$> lint opt file
where
pretty = unlines . map (concat . intersperse "\0" . lines)
lint :: String -> IO [String]
lint file = map show <$> hlint [file, "--quiet", "--ignore=Use camelCase"]
lint :: Options -> String -> IO [String]
lint opt file = map show <$> hlint ([file, "--quiet"] ++ hlintOpts opt)