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
Incorrect use of order of operations is a pitfall I've seen a number of programmers fall into, and a linter would be perfect to suggest use of parentheses in those cases. This would not just be to prevent logic mistakes, but also clarify to anyone who does not have the order of precedence memorized. As such, I would expect this to be INFO or lower severity.
This would be triggered for expressions containing operators with mixed precedence-level without parentheses around sub-expressions.
Boolean operations
It should work for any conditionals such as those found in if, else if, while, for, <cfif>, <cfelseif>, cfloop.
Incorrect use of order of operations is a pitfall I've seen a number of programmers fall into, and a linter would be perfect to suggest use of parentheses in those cases. This would not just be to prevent logic mistakes, but also clarify to anyone who does not have the order of precedence memorized. As such, I would expect this to be INFO or lower severity.
This would be triggered for expressions containing operators with mixed precedence-level without parentheses around sub-expressions.
Boolean operations
It should work for any conditionals such as those found in
if
,else if
,while
,for
,<cfif>
,<cfelseif>
,cfloop
.Examples
foo OR bar AND xyz
Math operations
TODO?
References
The text was updated successfully, but these errors were encountered: