honnef.co/go/tools@v0.5.0-0.dev.0.20240520180541-dcae280a5e87/stylecheck/st1017/testdata/src/example.com/CheckYodaConditions/CheckYodaConditions.go.golden (about)

     1  // Package pkg ...
     2  package pkg
     3  
     4  func fn(x string, y int) {
     5  	if x == "" { //@ diag(`Yoda`)
     6  	}
     7  	if y == 0 { //@ diag(`Yoda`)
     8  	}
     9  	if 0 > y {
    10  	}
    11  	if "" == "" {
    12  	}
    13  
    14  	if "" == "" || y == 0 { //@ diag(`Yoda`)
    15  	}
    16  }