mirror of
https://github.com/koalaman/shellcheck
synced 2025-07-07 05:21:34 -07:00
Filter warnings by annotations in unit tests
This commit is contained in:
parent
c5aa171a5f
commit
3116ed3ae5
1 changed files with 5 additions and 1 deletions
|
@ -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
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue