Skip to content

Commit 36878a9

Browse files
committedMar 7, 2024
Skip the G601 tests for Go version 1.22
Signed-off-by: Cosmin Cojocar <gcojocar@adobe.com>
1 parent 903c75b commit 36878a9

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed
 

‎rules/rules_test.go

+4-1
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,10 @@ var _ = Describe("gosec rules", func() {
192192
})
193193

194194
It("should detect implicit aliasing in ForRange", func() {
195-
runner("G601", testutils.SampleCodeG601)
195+
major, minor, _ := gosec.GoVersion()
196+
if major <= 1 && minor < 22 {
197+
runner("G601", testutils.SampleCodeG601)
198+
}
196199
})
197200

198201
It("should detect out of bounds slice access", func() {

0 commit comments

Comments
 (0)
Please sign in to comment.