Skip to content

style: resolve gosec and staticcheck lint warnings#210

Merged
indaco merged 1 commit intomainfrom
style/golangci-lint-gosec-staticcheck
Feb 20, 2026
Merged

style: resolve gosec and staticcheck lint warnings#210
indaco merged 1 commit intomainfrom
style/golangci-lint-gosec-staticcheck

Conversation

@indaco
Copy link
Copy Markdown
Owner

@indaco indaco commented Feb 20, 2026

Description

Resolve all gosec and staticcheck warnings reported by golangci-lint:

  • Suppress G702 (command injection) false positives in test files using the standard Go test re-exec pattern (os.Args[0])
  • Suppress G703 (path traversal) false positives for paths from os.CreateTemp
  • Suppress G115 (integer overflow uintptr -> int) for file descriptor conversions
  • Replace int -> rune conversion with strconv.Itoa in formatter_test.go
  • Replace WriteString(fmt.Sprintf(...)) with fmt.Fprintf(...) across 28 files (QF1012)

Related Issue

  • None

Notes for Reviewers

  • no behavior change - fmt.Fprintf writes directly to the builder instead of allocating an intermediate string.

@indaco indaco merged commit 83857d2 into main Feb 20, 2026
7 checks passed
@indaco indaco deleted the style/golangci-lint-gosec-staticcheck branch February 20, 2026 11:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant