fix: resolve golangci-lint warnings

- Handle ignored errors with explicit _ assignment (errcheck)
- Add #nosec comments for false positive G304/G204 warnings (gosec)
- Fix misspelling: cancelled -> canceled

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Steve Yegge
2025-12-13 10:07:20 +11:00
parent 322f734010
commit 2fd1d1fb87
7 changed files with 13 additions and 12 deletions

View File

@@ -256,6 +256,7 @@ func isClaudeSetupComplete() bool {
// Check if beads plugin is installed - plugin now provides hooks automatically
settingsPath := filepath.Join(home, ".claude", "settings.json")
// #nosec G304 -- settingsPath is constructed from user home dir, not user input
if data, err := os.ReadFile(settingsPath); err == nil {
var settings map[string]interface{}
if err := json.Unmarshal(data, &settings); err == nil {
@@ -287,7 +288,7 @@ func isClaudeSetupComplete() bool {
// hasBeadsPrimeHooks checks if a settings file has bd prime hooks configured
func hasBeadsPrimeHooks(settingsPath string) bool {
data, err := os.ReadFile(settingsPath)
data, err := os.ReadFile(settingsPath) // #nosec G304 -- path is either from home dir or relative project path
if err != nil {
return false
}