Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Flag usage of >< etc when -gt, -lt, etc should be used #1900

Open
2 tasks done
erikread opened this issue Mar 6, 2023 · 2 comments
Open
2 tasks done

Flag usage of >< etc when -gt, -lt, etc should be used #1900

erikread opened this issue Mar 6, 2023 · 2 comments

Comments

@erikread
Copy link

erikread commented Mar 6, 2023

Prerequisites

  • I have written a descriptive issue title.
  • I have searched all issues to ensure it has not already been reported.

Summary

I would like the Visual Studio Code editor to flag usage of >< !=, etc as possibly incorrect if used in a conditional.
I go back and forth between languages and I inadvertently use C#/TypeScript syntax in conditionals and then it takes a while to find my error. An error/warning/hint that I am probably using the incorrect syntax would be great.

Proposed Design

No response

@andyleejordan
Copy link
Member

This should probably be a request of PowerShell Script Analyzer

@andyleejordan andyleejordan transferred this issue from PowerShell/vscode-powershell Mar 6, 2023
@bergmeister
Copy link
Collaborator

Yes, we already have a similar rule around accidental usage of = instead of -eq

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants