go-gl / mathgl

A pure Go 3D math library.
BSD 3-Clause "New" or "Revised" License
554 stars 65 forks source link

Possible copy & paste errors in tests #58

Closed dominikh closed 8 years ago

dominikh commented 8 years ago

The following checks check the same indices and most likely meant to check different indices:

/src/github.com/go-gl/mathgl/mgl32/vec_test.go:27:5: identical expressions on the left and right side of the '||' operator
/src/github.com/go-gl/mathgl/mgl32/vec_test.go:45:5: identical expressions on the left and right side of the '||' operator
/src/github.com/go-gl/mathgl/mgl32/vec_test.go:63:5: identical expressions on the left and right side of the '||' operator
/src/github.com/go-gl/mathgl/mgl64/vec_test.go:29:5: identical expressions on the left and right side of the '||' operator
/src/github.com/go-gl/mathgl/mgl64/vec_test.go:47:5: identical expressions on the left and right side of the '||' operator
/src/github.com/go-gl/mathgl/mgl64/vec_test.go:65:5: identical expressions on the left and right side of the '||' operator
ghost commented 8 years ago

What tool found these ?

dominikh commented 8 years ago

@hydroflame a local version of staticcheck. It's a new check I'm currently working on.