mirror of
https://github.com/koalaman/shellcheck.git
synced 2025-08-08 00:07:56 +08:00
Filter warnings by annotations in unit tests
This commit is contained in:
@@ -273,7 +273,11 @@ producesComments :: (Parameters -> Token -> [TokenComment]) -> String -> Maybe B
|
||||
producesComments f s = do
|
||||
let pr = pScript s
|
||||
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
|
||||
dist :: Eq a => [a] -> [a] -> Int
|
||||
|
Reference in New Issue
Block a user