feature request: continue parsing ignoring hard errors inside ((..))
or add a "don't parse" mark
#3105
Open
4 tasks done
For bugs
shellcheck --version
or "online"): online, 0.10.0For new checks and feature suggestions
Here's a snippet or screenshot that shows the problem:
There are some expressions that give shellcheck parsing errors, like:
for (( i = 0, max = ${#a[@]} > ${#b[@]} ? ${#a[@]} : ${#b[@]}, max > ${4:-3} ? max = ${4:-3} : 0; i < max; ++i )); do
(( $invert( 1 == 1 ) ))
Here's what shellcheck currently says:
Here's what I wanted or expected to see:
SC1070 and SC1073 are completely great, fine and understandable. The issue is it is impossible to ignore them. Either we ignore them, in which case the rest of the file is not analyzed at all, or we have a hard error forever.
It would be great if:
#shellcheck parser=off
#shellcheck parser=on
with which I would be able to disable the shellcheck parser for problematic code.sed '/#shellcheck parser=off/,/#shellcheck parser=on/s/.*/:/'
((
and))
.Thank you, shellcheck is amazing, great project, I'm using it daily.
The text was updated successfully, but these errors were encountered: