mirror of
https://github.com/koalaman/shellcheck.git
synced 2025-08-08 16:26:26 +08:00
Improve handling of command prefixes like exec/command (fixes #2008)
This commit is contained in:
@@ -280,7 +280,7 @@ checkBashisms = ForShell [Sh, Dash] $ \t -> do
|
||||
flagRegex = mkRegex "^-[eEsn]+$"
|
||||
|
||||
bashism t@(T_SimpleCommand _ _ (cmd:arg:_))
|
||||
| t `isCommand` "exec" && "-" `isPrefixOf` concat (oversimplify arg) =
|
||||
| getLiteralString cmd == Just "exec" && "-" `isPrefixOf` concat (oversimplify arg) =
|
||||
warnMsg (getId arg) "exec flags are"
|
||||
bashism t@(T_SimpleCommand id _ _)
|
||||
| t `isCommand` "let" = warnMsg id "'let' is"
|
||||
|
Reference in New Issue
Block a user