Filter warnings by annotations in unit tests

This commit is contained in:
Vidar Holen 2019-06-30 16:36:03 -07:00
parent c5aa171a5f
commit 3116ed3ae5
1 changed files with 5 additions and 1 deletions

View File

@ -273,7 +273,11 @@ producesComments :: (Parameters -> Token -> [TokenComment]) -> String -> Maybe B
producesComments f s = do producesComments f s = do
let pr = pScript s let pr = pScript s
prRoot pr prRoot pr
return . not . null $ runList (defaultSpec pr) [f] let spec = defaultSpec pr
let params = makeParameters spec
return . not . null $
filterByAnnotation spec params $
runList spec [f]
-- Copied from https://wiki.haskell.org/Edit_distance -- Copied from https://wiki.haskell.org/Edit_distance
dist :: Eq a => [a] -> [a] -> Int dist :: Eq a => [a] -> [a] -> Int