mirror of
https://github.com/koalaman/shellcheck
synced 2025-07-11 07:36:29 -07:00
Simplify matchToken
This commit is contained in:
parent
0e00249eae
commit
057cc714b3
1 changed files with 1 additions and 4 deletions
|
@ -1220,10 +1220,7 @@ checkLiteralBreakingTest _ t = sequence_ $
|
||||||
where
|
where
|
||||||
hasEquals = matchToken ('=' `elem`)
|
hasEquals = matchToken ('=' `elem`)
|
||||||
isNonEmpty = matchToken (not . null)
|
isNonEmpty = matchToken (not . null)
|
||||||
matchToken m t = isJust $ do
|
matchToken m t = maybe False m (getLiteralString t)
|
||||||
str <- getLiteralString t
|
|
||||||
guard $ m str
|
|
||||||
return ()
|
|
||||||
|
|
||||||
comparisonWarning list = do
|
comparisonWarning list = do
|
||||||
token <- find hasEquals list
|
token <- find hasEquals list
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue