SC2016: disable for mumps -run %XCMD and LOOP%XCMD
This commit is contained in:
parent
ff5f29f661
commit
93486ed6ac
|
@ -934,6 +934,11 @@ prop_checkSingleQuotedVariables16= verify checkSingleQuotedVariables "git '$a'"
|
||||||
prop_checkSingleQuotedVariables17= verifyNot checkSingleQuotedVariables "rename 's/(.)a/$1/g' *"
|
prop_checkSingleQuotedVariables17= verifyNot checkSingleQuotedVariables "rename 's/(.)a/$1/g' *"
|
||||||
prop_checkSingleQuotedVariables18= verifyNot checkSingleQuotedVariables "echo '``'"
|
prop_checkSingleQuotedVariables18= verifyNot checkSingleQuotedVariables "echo '``'"
|
||||||
prop_checkSingleQuotedVariables19= verifyNot checkSingleQuotedVariables "echo '```'"
|
prop_checkSingleQuotedVariables19= verifyNot checkSingleQuotedVariables "echo '```'"
|
||||||
|
prop_checkSingleQuotedVariables20= verifyNot checkSingleQuotedVariables "mumps -run %XCMD 'W $O(^GLOBAL(5))'"
|
||||||
|
prop_checkSingleQuotedVariables21= verifyNot checkSingleQuotedVariables "mumps -run LOOP%XCMD --xec 'W $O(^GLOBAL(6))'"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
checkSingleQuotedVariables params t@(T_SingleQuoted id s) =
|
checkSingleQuotedVariables params t@(T_SingleQuoted id s) =
|
||||||
when (s `matches` re) $
|
when (s `matches` re) $
|
||||||
|
@ -947,7 +952,7 @@ checkSingleQuotedVariables params t@(T_SingleQuoted id s) =
|
||||||
commandName = fromMaybe "" $ do
|
commandName = fromMaybe "" $ do
|
||||||
cmd <- getClosestCommand parents t
|
cmd <- getClosestCommand parents t
|
||||||
name <- getCommandBasename cmd
|
name <- getCommandBasename cmd
|
||||||
return $ if name == "find" then getFindCommand cmd else if name == "git" then getGitCommand cmd else name
|
return $ if name == "find" then getFindCommand cmd else if name == "git" then getGitCommand cmd else if name == "mumps" then getMumpsCommand cmd else name
|
||||||
|
|
||||||
isProbablyOk =
|
isProbablyOk =
|
||||||
any isOkAssignment (take 3 $ getPath parents t)
|
any isOkAssignment (take 3 $ getPath parents t)
|
||||||
|
@ -968,6 +973,8 @@ checkSingleQuotedVariables params t@(T_SingleQuoted id s) =
|
||||||
,"rename"
|
,"rename"
|
||||||
,"unset"
|
,"unset"
|
||||||
,"git filter-branch"
|
,"git filter-branch"
|
||||||
|
,"mumps -run %XCMD"
|
||||||
|
,"mumps -run LOOP%XCMD"
|
||||||
]
|
]
|
||||||
|| "awk" `isSuffixOf` commandName
|
|| "awk" `isSuffixOf` commandName
|
||||||
|| "perl" `isPrefixOf` commandName
|
|| "perl" `isPrefixOf` commandName
|
||||||
|
@ -997,6 +1004,13 @@ checkSingleQuotedVariables params t@(T_SingleQuoted id s) =
|
||||||
_ -> "git"
|
_ -> "git"
|
||||||
getGitCommand (T_Redirecting _ _ cmd) = getGitCommand cmd
|
getGitCommand (T_Redirecting _ _ cmd) = getGitCommand cmd
|
||||||
getGitCommand _ = "git"
|
getGitCommand _ = "git"
|
||||||
|
getMumpsCommand (T_SimpleCommand _ _ words) =
|
||||||
|
case map getLiteralString words of
|
||||||
|
Just "mumps":Just "-run":Just "%XCMD":_ -> "mumps -run %XCMD"
|
||||||
|
Just "mumps":Just "-run":Just "LOOP%XCMD":_ -> "mumps -run LOOP%XCMD"
|
||||||
|
_ -> "mumps"
|
||||||
|
getMumpsCommand (T_Redirecting _ _ cmd) = getMumpsCommand cmd
|
||||||
|
getMumpsCommand _ = "mumps"
|
||||||
checkSingleQuotedVariables _ _ = return ()
|
checkSingleQuotedVariables _ _ = return ()
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue