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:
It's somewhat common to try to put parens around for arguments:
forfin (a b c)
doecho"$f";done
Examples:
for dir in ( cat foo.txt )
for file in ( file* )
for num in ( 0..100 )
Here's what shellcheck currently says:
Currently, this is caught with a generic "shell word starts with (" check:
for f in (a b c)
^-- SC1073: Couldn't parse this for loop. Fix to allow more checks.
^-- SC1036: '(' is invalid here. Did you forget to escape it?
But obviously it's not supposed to be escaped.
Here's what I wanted or expected to see:
Since the intent is known, a specific warning could be more helpful:
for f in (a b c)
^-- SC1073: Couldn't parse this for loop. Fix to allow more checks.
^-- SC1XXX: Remove invalid (..) around `for` arguments, or use `while read` to process command output.
The text was updated successfully, but these errors were encountered:
For bugs
shellcheck --version
or "online"):For new checks and feature suggestions
Here's a snippet or screenshot that shows the problem:
It's somewhat common to try to put parens around for arguments:
Examples:
Here's what shellcheck currently says:
Currently, this is caught with a generic "shell word starts with (" check:
But obviously it's not supposed to be escaped.
Here's what I wanted or expected to see:
Since the intent is known, a specific warning could be more helpful:
The text was updated successfully, but these errors were encountered: