github.com/amarpal/go-tools@v0.0.0-20240422043104-40142f59f616/staticcheck/sa4008/testdata/src/example.com/CheckLoopCondition/CheckLoopCondition.go (about) 1 package pkg 2 3 func fn() { 4 for i := 0; i < 10; i++ { 5 for j := 0; j < 10; i++ { //@ diag(`variable in loop condition never changes`) 6 } 7 } 8 9 counter := 0 10 for i := 0; i < 10; i++ { 11 for j := 0; j < 10; counter++ { 12 x := &j 13 *x++ 14 } 15 } 16 }