mirror of
https://github.com/koalaman/shellcheck.git
synced 2025-08-09 05:53:06 +08:00
Allow tests to access token positions for fixes
This commit is contained in:
@@ -199,8 +199,9 @@ checkUnqualifiedCommand _ _ _ = return ()
|
||||
checkNode f = producesComments (runNodeAnalysis f)
|
||||
producesComments :: (Parameters -> Token -> [TokenComment]) -> String -> Maybe Bool
|
||||
producesComments f s = do
|
||||
root <- pScript s
|
||||
return . not . null $ runList (defaultSpec root) [f]
|
||||
let pr = pScript s
|
||||
prRoot pr
|
||||
return . not . null $ runList (defaultSpec pr) [f]
|
||||
|
||||
-- Copied from https://wiki.haskell.org/Edit_distance
|
||||
dist :: Eq a => [a] -> [a] -> Int
|
||||
|
Reference in New Issue
Block a user