refactor/cmd: name the repeated localhost and expose literals, document the empty Windows stub #98

Merged
pti merged 1 commit from refactor/literals-cmd into main 2026-10-19 22:46:45 +02:00
Owner

Part of the SonarQube cleanup in #73, the cmd slice. Three go:S1192 and go:S1186 findings. The localhost: pinhole prefix in sbxcontainer.go, three uses, becomes sbxLocalhostPrefix. The --expose= guix shell flag in guixcontainer.go, five uses, becomes guixExposeFlag. The empty Windows handleSIGHUP stub gains a body comment explaining that Windows has no SIGHUP to subscribe to while file watching still provides hot reload. Behaviour unchanged, GOOS=windows go vet passes, existing tests untouched. 🤖 Generated with Claude Code

Part of the SonarQube cleanup in #73, the cmd slice. Three go:S1192 and go:S1186 findings. The localhost: pinhole prefix in sbxcontainer.go, three uses, becomes sbxLocalhostPrefix. The --expose= guix shell flag in guixcontainer.go, five uses, becomes guixExposeFlag. The empty Windows handleSIGHUP stub gains a body comment explaining that Windows has no SIGHUP to subscribe to while file watching still provides hot reload. Behaviour unchanged, GOOS=windows go vet passes, existing tests untouched. 🤖 Generated with Claude Code
refactor(cmd): name the repeated localhost and expose literals, document the empty Windows stub
All checks were successful
Lint / lint (pull_request) Successful in 1m13s
Lint / sonarqube (pull_request) Has been skipped
6a3e255f6b
Sonar flagged "localhost:" (3 uses in sbxcontainer.go) and "--expose="
(5 uses in guixcontainer.go) as repeated literals; each now has one
named constant. handleSIGHUP on Windows had an empty body with no
explanation; it now says the Unix counterpart reloads config on SIGHUP
and Windows has no such signal. Behaviour-neutral.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
pti merged commit a3796a2dd7 into main 2026-10-19 22:46:45 +02:00
pti deleted branch refactor/literals-cmd 2026-10-19 22:46:46 +02:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
pti/wraptool!98
No description provided.