mirror of
https://github.com/koalaman/shellcheck.git
synced 2025-08-09 14:15:55 +08:00
Merge pull request #1203 from ngzhian/1199
Whitelist rename for SC2016 (fixes #1199)
This commit is contained in:
@@ -795,6 +795,8 @@ prop_checkSingleQuotedVariables13= verifyNot checkSingleQuotedVariables "busybox
|
|||||||
prop_checkSingleQuotedVariables14= verifyNot checkSingleQuotedVariables "[ -v 'bar[$foo]' ]"
|
prop_checkSingleQuotedVariables14= verifyNot checkSingleQuotedVariables "[ -v 'bar[$foo]' ]"
|
||||||
prop_checkSingleQuotedVariables15= verifyNot checkSingleQuotedVariables "git filter-branch 'test $GIT_COMMIT'"
|
prop_checkSingleQuotedVariables15= verifyNot checkSingleQuotedVariables "git filter-branch 'test $GIT_COMMIT'"
|
||||||
prop_checkSingleQuotedVariables16= verify checkSingleQuotedVariables "git '$a'"
|
prop_checkSingleQuotedVariables16= verify checkSingleQuotedVariables "git '$a'"
|
||||||
|
prop_checkSingleQuotedVariables17= verifyNot checkSingleQuotedVariables "rename 's/(.)a/$1/g' *"
|
||||||
|
|
||||||
checkSingleQuotedVariables params t@(T_SingleQuoted id s) =
|
checkSingleQuotedVariables params t@(T_SingleQuoted id s) =
|
||||||
when (s `matches` re) $
|
when (s `matches` re) $
|
||||||
if "sed" == commandName
|
if "sed" == commandName
|
||||||
@@ -825,6 +827,7 @@ checkSingleQuotedVariables params t@(T_SingleQuoted id s) =
|
|||||||
,"docker" -- like above
|
,"docker" -- like above
|
||||||
,"dpkg-query"
|
,"dpkg-query"
|
||||||
,"jq" -- could also check that user provides --arg
|
,"jq" -- could also check that user provides --arg
|
||||||
|
,"rename"
|
||||||
,"unset"
|
,"unset"
|
||||||
,"git filter-branch"
|
,"git filter-branch"
|
||||||
]
|
]
|
||||||
|
Reference in New Issue
Block a user