mirror of
https://github.com/koalaman/shellcheck.git
synced 2025-08-10 22:47:43 +08:00
Add less common actions to find -o check.
This commit is contained in:
@@ -363,7 +363,7 @@ checkFindActionPrecedence = CommandCheck (Basename "find") (f . arguments)
|
|||||||
then warnFor (list !! (length pattern - 1))
|
then warnFor (list !! (length pattern - 1))
|
||||||
else f rest
|
else f rest
|
||||||
isMatch = isParam [ "-name", "-regex", "-iname", "-iregex", "-wholename", "-iwholename" ]
|
isMatch = isParam [ "-name", "-regex", "-iname", "-iregex", "-wholename", "-iwholename" ]
|
||||||
isAction = isParam [ "-exec", "-execdir", "-delete", "-print", "-print0" ]
|
isAction = isParam [ "-exec", "-execdir", "-delete", "-print", "-print0", "-fls", "-fprint", "-fprint0", "-fprintf", "-ls", "-ok", "-okdir", "-printf" ]
|
||||||
isParam strs t = fromMaybe False $ do
|
isParam strs t = fromMaybe False $ do
|
||||||
param <- getLiteralString t
|
param <- getLiteralString t
|
||||||
return $ param `elem` strs
|
return $ param `elem` strs
|
||||||
|
Reference in New Issue
Block a user