mirror of
https://github.com/koalaman/shellcheck.git
synced 2025-08-09 08:21:39 +08:00
Get rid of bracedString everywhere it's easy to
This commit is contained in:
@@ -718,10 +718,10 @@ checkReadExpansions = CommandCheck (Exactly "read") check
|
||||
getSingleUnmodifiedBracedString :: Token -> Maybe String
|
||||
getSingleUnmodifiedBracedString word =
|
||||
case getWordParts word of
|
||||
[t@(T_DollarBraced {})] ->
|
||||
let contents = bracedString t
|
||||
[T_DollarBraced _ _ l] ->
|
||||
let contents = concat $ oversimplify l
|
||||
name = getBracedReference contents
|
||||
in guard (contents == name) >> return (bracedString t)
|
||||
in guard (contents == name) >> return contents
|
||||
_ -> Nothing
|
||||
|
||||
prop_checkAliasesUsesArgs1 = verify checkAliasesUsesArgs "alias a='cp $1 /a'"
|
||||
|
Reference in New Issue
Block a user