Bump dependency on HLint to 2.*

This commit is contained in:
Daniel Gröber
2017-05-25 03:26:33 +02:00
parent e2490a1cf0
commit efca8f8270
3 changed files with 16 additions and 7 deletions

View File

@@ -8,10 +8,14 @@ spec :: Spec
spec = do
describe "lint" $ do
it "can detect a redundant import" $ do
res <- runD $ lint defaultLintOpts "test/data/hlint/hlint.hs"
res <- runD $ lint lintOpts "test/data/hlint/hlint.hs"
res `shouldBe` "test/data/hlint/hlint.hs:4:8: Warning: Redundant do\NULFound:\NUL do putStrLn \"Hello, world!\"\NULWhy not:\NUL putStrLn \"Hello, world!\"\n"
context "when no suggestions are given" $ do
it "doesn't output an empty line" $ do
res <- runD $ lint defaultLintOpts "test/data/ghc-mod-check/lib/Data/Foo.hs"
res <- runD $ lint lintOpts "test/data/ghc-mod-check/lib/Data/Foo.hs"
res `shouldBe` ""
lintOpts :: LintOpts
lintOpts =
defaultLintOpts { optLintHlintOpts = ["--ignore=Use module export list"] }