Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.Sign up
YodaCondition false positive on string interpolation #8185
Yoda condition cop is fired in a situation where the left side is an interpolated string and right hand side is a constant. It works fine if string interpolation is removed.
I expect YodaCondition not to be reported when comparing an interpolated string (left side) to a constant (right side).
YodaCondition gets triggered.
Steps to reproduce the problem
The following triggers the cop: