1
1
mirror of https://github.com/github/semantic.git synced 2024-11-24 08:54:07 +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