github.com/serversong/goreporter@v0.0.0-20200325104552-3cfaf44fd178/linters/staticcheck/testdata/CheckLhsRhsIdentical.go (about) 1 package pkg 2 3 func fn(a int, s []int, f float64) { 4 if 1 == 1 { // MATCH /identical expressions/ 5 println() 6 } 7 if a == a { // MATCH /identical expressions/ 8 println() 9 } 10 if a != a { // MATCH /identical expressions/ 11 println() 12 } 13 if s[0] == s[0] { // MATCH /identical expressions/ 14 println() 15 } 16 if 1&1 == 1 { // MATCH /identical expressions/ 17 println() 18 } 19 if (1 + 2 + 3) == (1 + 2 + 3) { // MATCH /identical expressions/ 20 println() 21 } 22 if f == f { 23 println() 24 } 25 if f != f { 26 println() 27 } 28 }