Fix G602 regression coverage for issue #1545 and stabilize G117 TOML test dependency (#1546)

This PR adds regression coverage for the G602 false-positive reported in
issue #1545 by introducing two sample cases: one valid range-over-array
indexing pattern that should not trigger, and one true out-of-bounds
variant that should still be detected.

It also fixes test instability in the rules suite by adding the missing
BurntSushi TOML module metadata required by G117 sample compilation in
the test harness.

Signed-off-by: Cosmin Cojocar <cosmin@cojocar.ch>
This commit is contained in:
Cosmin Cojocar
2026-02-25 15:01:01 +01:00
committed by GitHub
parent eba2d1582b
commit 5b580c76e4
3 changed files with 27 additions and 0 deletions
+1
View File
@@ -24,6 +24,7 @@ require (
cloud.google.com/go v0.121.2 // indirect
cloud.google.com/go/auth v0.16.5 // indirect
cloud.google.com/go/compute/metadata v0.8.0 // indirect
github.com/BurntSushi/toml v0.3.1 // indirect
github.com/Masterminds/semver/v3 v3.4.0 // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/felixge/httpsnoop v1.0.4 // indirect