github.com/amarpal/go-tools@v0.0.0-20240422043104-40142f59f616/stylecheck/st1017/testdata/src/example.com/CheckYodaConditions/CheckYodaConditions.go (about) 1 // Package pkg ... 2 package pkg 3 4 func fn(x string, y int) { 5 if "" == x { //@ diag(`Yoda`) 6 } 7 if 0 == y { //@ diag(`Yoda`) 8 } 9 if 0 > y { 10 } 11 if "" == "" { 12 } 13 14 if "" == "" || 0 == y { //@ diag(`Yoda`) 15 } 16 }