chore(lint): bump golangci-lint to v2.11.1 (#7905)

- Added nolint to plugin/auto/walk.go to avoid a symlink/TOCTOU
  warning, as it needs to follow symlink.
- Replaced a few flagged integer conversions with safe equivalents in
  cache hashing, reuseport socket setup, and TLS arg handling
- Preallocated response rule slices in plugin/rewrite/name.go
- Replaced WriteString(fmt.Sprintf/Sprintln(...)) with direct
  fmt.Fprint* calls
- Removed stale nolint directives from code and tests that are no
  longer needed

Signed-off-by: Ville Vesilehto <ville@vesilehto.fi>
This commit is contained in:
Ville Vesilehto
2026-03-06 21:50:24 +02:00
committed by GitHub
parent ab04d3c0ca
commit 90a9739478
12 changed files with 41 additions and 23 deletions

View File

@@ -39,7 +39,7 @@ func (a Auto) Walk() error {
return nil
}
reader, err := os.Open(filepath.Clean(path))
reader, err := os.Open(filepath.Clean(path)) //nolint:gosec // G122: path is from filepath.Walk rooted in a.directory; symlinks must be followed for configmap-style mounts
if err != nil {
log.Warningf("Opening %s failed: %s", path, err)
return nil