- Notifications
You must be signed in to change notification settings - Fork 15.3k
Closed
Labels
Description
I'm adding this here so, i woudn't forget.
Create check that detect missing () around mathematical expressions when operators of different priority are used.
int main() { return 2 + 2 * 2; } Should be:
int main() { return 2 + (2 * 2); } Similar thing for other math operators.
Main purpose is to explicitly show evaluation order.
Consider adding option to skip constructions that properly handled from left to right like: 2 * 2 + 2.