Open escoand opened 7 months ago
Same problem with VS Code add-on (https://marketplace.visualstudio.com/items/timonwong.shellcheck/changelog) - it uses 0.10.0:
For https://www.shellcheck.net/ all good (maybe due to not updated):
Just ran into an instance of shellcheck 0.10.0 complaining throwing an SC2319 warning about this code:
#!/bin/bash
[ -f /var/run/.network_upgrade_bootstrap ]
upgr_bootstrap=$?
if [ ${upgr_bootstrap} -eq 0 ]; then
log_it info "Upgrade bootstrap is in execution"
fi
ifaces=$(update_interfaces ${upgr_bootstrap})
update_routes "${ifaces}"
https://www.shellcheck.net/ thinks it's fine. shellcheck-py-0.9.0.6 also thinks it's fine.
Looks like https://github.com/koalaman/shellcheck/issues/2952 is duplicate of this issue.
@koalaman @brother Can anyone take a look? Problem is still here.
Same here! Hope to see the fix... Help, please!
I also ran into this warning where it was unexpected, but in a different way to the original post:
test ! -s "$errors" || {
exit_code=$?
cat "$errors" >&2
return $exit_code
}
Still hope for a fix.
Shellcheck in 0.10.0 complains about an error which is explicit mentioned in the wiki as not relevant. Shellcheck 0.9.0 and also shellcheck.net don't warn. But this is just happening in some cases, see below.
For bugs
shellcheck --version
or "online"): 0.10.0For new checks and feature suggestions
Here's a snippet or screenshot that shows the problem:
Here's what shellcheck currently says:
Here's what I wanted or expected to see:
nothing