mirror of
https://github.com/koalaman/shellcheck
synced 2025-07-06 21:11:35 -07:00
Allow tests to access token positions for fixes
This commit is contained in:
parent
b47e083ee3
commit
5b3f17c29d
2 changed files with 22 additions and 19 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue