mirror of
https://github.com/koalaman/shellcheck
synced 2025-07-07 05:21:34 -07:00
Improve handling of command prefixes like exec/command (fixes #2008)
This commit is contained in:
parent
5b86777f9d
commit
5d753212fb
4 changed files with 81 additions and 53 deletions
|
@ -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"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue