Debian Codegraph @

stylecheck/st1017/testdata/go1.0/CheckYodaConditions/CheckYodaConditions.go

raw
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 }