intellij-powershell icon indicating copy to clipboard operation
intellij-powershell copied to clipboard

Error checking doesn't catch using <, > instead of the correct -lt, -gt in an if statement

Open joshuaking-madtech opened this issue 2 months ago • 1 comments

When an conditional mistakenly uses the <, > instead of the PowerShell -lt -gt compare operators, subsequent suggestions/code completion break but the error isn't highlighted.

joshuaking-madtech avatar Apr 17 '24 22:04 joshuaking-madtech

Could you please show some examples of contexts when the plugin gets it wrong?

It could be that our (very relaxed) grammar misses the errors, while PSES-powered completion gets it right.

In certain cases, > may be valid in same places where -gt is, while having totally different meanings. Say,

 if (echo 12 > $null) { echo 1 } else { echo 2 }

is a perfectly valid syntactic construct, even if a bit meaningless.

ForNeVeR avatar Apr 18 '24 10:04 ForNeVeR

This issue was closed because it has been open for 14 days, but no requested information was received. Please leave a comment if you think this is a mistake.

github-actions[bot] avatar May 03 '24 01:05 github-actions[bot]