From: Ramakrishnan Muthukrishnan Date: Mon, 23 Mar 2015 14:29:08 +0000 (+0530) Subject: Run HLint as a test suite. X-Git-Url: https://git.rkrishnan.org/components/com_hotproperty/flags?a=commitdiff_plain;h=66a3947c4d76ee9ab104c56e34b5851a0371fc83;p=functorrent.git Run HLint as a test suite. --- diff --git a/functorrent.cabal b/functorrent.cabal index c70ff4e..72295f6 100644 --- a/functorrent.cabal +++ b/functorrent.cabal @@ -66,3 +66,11 @@ test-suite functorrent-test doctest, tasty, tasty-hunit + +test-suite functorrent-hlint + type: exitcode-stdio-1.0 + default-language: Haskell2010 + hs-source-dirs: test + main-is: hlint.hs + build-depends: base, + hlint diff --git a/test/hlint.hs b/test/hlint.hs new file mode 100644 index 0000000..0fa2512 --- /dev/null +++ b/test/hlint.hs @@ -0,0 +1,12 @@ +module Main where + +import Control.Monad +import Language.Haskell.HLint +import System.Environment +import System.Exit + +main :: IO () +main = do + args <- getArgs + hints <- hlint $ ["src", "--cpp-define=HLINT", "--cpp-ansi"] ++ args + unless (null hints) exitFailure