Open ThunderFrame opened 8 years ago
In other words, a Yoda Condition inspection?
Shouldn't be too hard to implement, I'd say it's nothing we should be interfering with though. The only thing where this could be useful IMO is in some "inconsistent conditional ordering" inspection, which would evaluate all conditionals and flag all that don't follow the majority. That's something I could get behind
In comparison conditions, code is more readable when the operands are in a readable order, unlike the following:
Granted, some might argue that this is a matter of personal preference, and there are some special situations where both operands are suitable for either side of the comparison.