chore: code health review - test fix and error comments (bd-9g1z, bd-ork0)
- Remove TestFindJSONLPathDefault from .test-skip (now passes) - Add explanatory comments to 24 ignored error locations in cmd/bd: - Cobra flag methods (MarkHidden, MarkRequired, MarkDeprecated) - Best-effort cleanup/close operations - Process signaling operations Part of code health review epic bd-tggf. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -224,7 +224,7 @@ func acquireStartLock(lockPath, socketPath string) bool {
|
||||
}
|
||||
|
||||
_, _ = fmt.Fprintf(lockFile, "%d\n", os.Getpid())
|
||||
_ = lockFile.Close()
|
||||
_ = lockFile.Close() // Best-effort close during startup
|
||||
return true
|
||||
}
|
||||
|
||||
@@ -257,9 +257,9 @@ func handleExistingSocket(socketPath string) bool {
|
||||
}
|
||||
|
||||
debugLog("socket is stale, cleaning up")
|
||||
_ = os.Remove(socketPath)
|
||||
_ = os.Remove(socketPath) // Best-effort cleanup, file may not exist
|
||||
if pidFile != "" {
|
||||
_ = os.Remove(pidFile)
|
||||
_ = os.Remove(pidFile) // Best-effort cleanup, file may not exist
|
||||
}
|
||||
return false
|
||||
}
|
||||
@@ -353,7 +353,7 @@ func canDialSocket(socketPath string, timeout time.Duration) bool {
|
||||
if err != nil || client == nil {
|
||||
return false
|
||||
}
|
||||
_ = client.Close()
|
||||
_ = client.Close() // Best-effort close after health check
|
||||
return true
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user