golangci-lint/test/testdata/ineffassign.go
Denis Isaev ac77eaac68 Fix #282, fix #209: revert goimports commit
ed64e33c8c8bc9a919e2b85a1a08225b5ae59d70. Also add tests
for local mode of goimports and do refactoring of tests.
2018-11-10 11:46:37 +03:00

12 lines
136 B
Go

//args: -Eineffassign
package testdata
func _() {
x := 0
for {
_ = x
x = 0 // ERROR "ineffectual assignment to `x`"
x = 0
}
}