You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Here's a snippet or screenshot that shows the problem:
#!/usr/bin/env bashfoo(){
local input="${1:-/dev/stdin}"
cat "$input"
}
foo <<<"blah"
Here's what shellcheck currently says:
In test.sh line 3:
foo(){
^-- SC2120 (warning): foo references arguments, but none are ever passed.
In test.sh line 9:
foo <<<"blah"
^-----------^ SC2119 (info): Use foo "$@" if function's $1 should mean script's $1.
For more information:
https://www.shellcheck.net/wiki/SC2120 -- foo references arguments, but non...
https://www.shellcheck.net/wiki/SC2119 -- Use foo "$@" if function's $1 sho...
Here's what I wanted or expected to see:
It should say nothing about SC2120. An argument is being passed (a file descriptor), so, this one feels factually wrong to me.
SC2119, I am not quite sure what it would mean here, so, same thing, I would expect it to not say anything.
Apologies in advance if I am missing something here.
Thanks a lot!
The text was updated successfully, but these errors were encountered:
For bugs
shellcheck --version
or "online"): online and 0.9.0Here's a snippet or screenshot that shows the problem:
Here's what shellcheck currently says:
Here's what I wanted or expected to see:
It should say nothing about SC2120. An argument is being passed (a file descriptor), so, this one feels factually wrong to me.SC2119, I am not quite sure what it would mean here, so, same thing, I would expect it to not say anything.
Apologies in advance if I am missing something here.
Thanks a lot!
The text was updated successfully, but these errors were encountered: