1
1
mirror of https://github.com/github/semantic.git synced 2024-12-24 23:42:31 +03:00

Only fail for warnings/errors.

This commit is contained in:
Rob Rix 2018-06-19 09:46:01 -04:00
parent 9b5067e9e9
commit 6de4f61652

View File

@ -1,9 +1,9 @@
module Main (main) where
import Language.Haskell.HLint (hlint)
import Language.Haskell.HLint (Severity(..), hlint, suggestionSeverity)
import System.Exit (exitFailure, exitSuccess)
main :: IO ()
main = do
hints <- hlint [ "--language=TypeApplications", "src" ]
if null hints then exitSuccess else exitFailure
if null (filter ((>= Warning) . suggestionSeverity) hints) then exitSuccess else exitFailure