-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
False positives for SC2086 and SC2154 with named coprocess in bash #1066
Comments
From http://wiki.bash-hackers.org/syntax/keywords/coproc,
|
The bash manual says:
|
For bugs
shellcheck --version
or "online"): 0.4.6 and onlineHere's a snippet or screenshot that shows the problem:
Here's what shellcheck currently says:
Here's what I wanted or expected to see:
Neither warning should be displayed. The script is valid and executes successfully with output
bar
as expected, despite theset -u
on line 2.The SC2154 warning is spurious because creating the named coprocess
my_coproc
on line 4 assigns the variablemy_coproc_PID
. And bothmy_coproc_PID
andmy_coproc[1]
are known to be integers, so there's no need for double quotes or SC2086.The text was updated successfully, but these errors were encountered: