[QA] add more warnings

This commit is contained in:
Vincent Hanquez 2015-04-22 06:25:45 +01:00
parent c06edc9591
commit 4a82ef383d

7
QA.hs
View File

@ -27,6 +27,7 @@ disallowedModules =
[ (ModuleName "System.IO.Unsafe", ModuleName "Crypto.Internal.Compat")
, (ModuleName "Data.Byteable", ModuleName "Crypto.Internal.ByteArray")
, (ModuleName "Data.SecureMem", ModuleName "Crypto.Internal.ByteArray")
, (ModuleName "Data.ByteString", ModuleName "Crypto.Internal.ByteArray")
, (ModuleName "Control.Applicative", ModuleName "Crypto.Internal.Imports")
]
@ -39,6 +40,10 @@ perModuleAllowedModules =
[ ModuleName "Data.SecureMem"
]
)
, ("Crypto/Internal/ByteArray.hs",
[ ModuleName "Data.ByteString"
]
)
]
data ModuleState = ModuleState
@ -158,7 +163,7 @@ printReport st m =
printWarningImport st (ModuleName expected) (ModuleName actual) = do
incrWarnings st
setSGR [SetColor Foreground Vivid Yellow] >> putStrLn ("warning: use module " ++ expected ++ " instead of " ++ actual) >> setSGR []
setSGR [SetColor Foreground Vivid Yellow] >> putStrLn ("warning: using module " ++ expected ++ " , should use " ++ actual) >> setSGR []
printWarningExtension st ext = do
incrWarnings st