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
My shellcheck version (shellcheck --version or "online"): online
I tried on shellcheck.net and verified that this is still a problem on the latest commit
Here's a snippet or screenshot that shows the problem:
#! /bin/kshif [[ -z"" ]] thenecho yes ;fi
Here's what shellcheck currently says:
SC1049: Did you forget the 'then' for this 'if'? SC1073: Couldn't parse this if expression. Fix to allow more checks. SC1010: Use semicolon or linefeed before 'then' (or quote to make it literal). SC1050: Expected 'then'. SC1072: Unexpected keyword/token. Fix any mentioned problems and try again.
Here's what I wanted or expected to see:
Nothing. This is valid in Ksh, as far back as ksh88. The semicolon is not required before the then if the if condition uses double brackets.
For bugs
shellcheck --version
or "online"): onlineHere's a snippet or screenshot that shows the problem:
Here's what shellcheck currently says:
SC1049: Did you forget the 'then' for this 'if'?
SC1073: Couldn't parse this if expression. Fix to allow more checks.
SC1010: Use semicolon or linefeed before 'then' (or quote to make it literal).
SC1050: Expected 'then'.
SC1072: Unexpected keyword/token. Fix any mentioned problems and try again.
Here's what I wanted or expected to see:
Nothing. This is valid in Ksh, as far back as ksh88. The semicolon is not required before the
then
if theif
condition uses double brackets.See related StackOverflow question: https://stackoverflow.com/q/48107383/1313898
The text was updated successfully, but these errors were encountered: