Run HLint as a test suite.
language: haskell
ghc: 7.8
+install:
+ # Happy needs to be updated for haskell-src: https://github.com/haskell-suite/haskell-src-exts/issues/64
+ - cabal install happy
+ - cabal install --only-dependencies --enable-tests
\ No newline at end of file
main-is: Main.hs
other-extensions: OverloadedStrings
hs-source-dirs: src
- ghc-options: -Wall -fwarn-incomplete-patterns
+ ghc-options: -Wall -fwarn-incomplete-patterns -optc-Os
default-language: Haskell2010
build-depends: base,
base16-bytestring,
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
--- /dev/null
+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