gosec icon indicating copy to clipboard operation
gosec copied to clipboard

G601 should not be raised when GOEXPERIMENT=loopvar is enabled

Open Hades32 opened this issue 7 months ago • 1 comments

Summary

The underlying issue will be fixed in Go 1.22 and is available in Go 1.21 with the GOEXPERIMENT=loopvar flag enabled

Steps to reproduce the behavior

		for _, item := range items {
			cpItem = &item
			break
		}

gosec version

whatever is included in the latest golang-ci

Go version (output of 'go version')

go version go1.21.0 linux/amd64

Hades32 avatar Dec 21 '23 08:12 Hades32