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

Detect likely-unintended IF statements with multiple clauses, no parentheses #42

Open
isc-tleavitt opened this issue Jan 8, 2024 · 0 comments
Assignees
Labels
enhancement New feature or request

Comments

@isc-tleavitt
Copy link
Collaborator

Reported internally within InterSystems:

It's a relatively common error to not include parenthesis in IF statements with multiple clauses. This almost always produces unexpected results.

I'd suggest two basic warnings:

|| - Any use of || where adjacent non-whitespace characters are not the appropriate parenthesis.
&& - Any use of && where adjacent non-whitespace characters are not the appropriate parenthesis.

@isc-tleavitt isc-tleavitt added the enhancement New feature or request label Jan 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants