I'm trying to figure out a way to find all violations of our code standart for if statements which is
if(class.Prop == expectedValue)
DO NOT USE:
if(expectedValue == class.Prop)
Let's assume that expectedValue is integer just for simplicity.
I created a pattern "$constant$ == $anything$" and I can't figure out which placeholder I should use for constant. I tried expression, argument and id. It doesn't help I either find correct and incorrect statements or all of them.
Is it possible at all to find such construct using current implementation of search pattern ?
Thanks in advance,