From 47e9376c895ed7d4980775c89256641b1e456d4c Mon Sep 17 00:00:00 2001 From: Sean Gillespie <sean@mistersg.net> Date: Sat, 31 Dec 2016 00:55:53 -0500 Subject: [PATCH] Add an hlint test suite --- lambda-calculator.cabal | 9 +++++++++ test/HLint.hs | 16 ++++++++++++++++ 2 files changed, 25 insertions(+) create mode 100644 test/HLint.hs diff --git a/lambda-calculator.cabal b/lambda-calculator.cabal index 854fa75..d099f06 100644 --- a/lambda-calculator.cabal +++ b/lambda-calculator.cabal @@ -66,6 +66,15 @@ test-suite lambda-calculus-test ghc-options: -threaded -rtsopts -with-rtsopts=-N default-language: Haskell2010 +test-suite lambda-calculus-lint + type: exitcode-stdio-1.0 + hs-source-dirs: test + main-is: HLint.hs + build-depends: base <= 5, + hlint + ghc-options: -threaded -rtsopts -with-rtsopts=-N + default-language: Haskell2010 + source-repository head type: git location: https://github.com/sgillespie/lambda-calculus diff --git a/test/HLint.hs b/test/HLint.hs new file mode 100644 index 0000000..260bf9b --- /dev/null +++ b/test/HLint.hs @@ -0,0 +1,16 @@ +module Main (main) where + +import Language.Haskell.HLint (hlint) +import System.Exit (exitFailure, exitSuccess) + +arguments :: [String] +arguments = [ + "app", + "src", + "test" + ] + +main :: IO () +main = hlint arguments >>= main' + where main' [] = exitSuccess + main' _ = exitFailure -- GitLab