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:
@@ -72,7 +72,7 @@ func GitRemoveBeads(beadsDir string) error {
|
||||
// Try to remove each file (git rm ignores non-existent files with --ignore-unmatch)
|
||||
// Use --force to handle files with staged changes
|
||||
for _, file := range jsonlFiles {
|
||||
cmd := exec.Command("git", "rm", "--ignore-unmatch", "--quiet", "--force", file)
|
||||
cmd := exec.Command("git", "rm", "--ignore-unmatch", "--quiet", "--force", file) // #nosec G204 -- git is a constant, file is from controlled source
|
||||
var stderr bytes.Buffer
|
||||
cmd.Stderr = &stderr
|
||||
|
||||
|
||||
@@ -74,7 +74,7 @@ func CountImpact() (*ImpactSummary, error) {
|
||||
ctx := context.Background()
|
||||
store, err := sqlite.New(ctx, dbPath)
|
||||
if err == nil {
|
||||
defer store.Close()
|
||||
defer func() { _ = store.Close() }()
|
||||
|
||||
// Count all issues including tombstones
|
||||
allIssues, err := store.SearchIssues(ctx, "", types.IssueFilter{IncludeTombstones: true})
|
||||
|
||||
@@ -1178,12 +1178,12 @@ func (s *SQLiteStorage) executeDelete(ctx context.Context, tx *sql.Tx, inClause
|
||||
for rows.Next() {
|
||||
var id, issueType string
|
||||
if err := rows.Scan(&id, &issueType); err != nil {
|
||||
rows.Close()
|
||||
_ = rows.Close()
|
||||
return fmt.Errorf("failed to scan issue type: %w", err)
|
||||
}
|
||||
issueTypes[id] = issueType
|
||||
}
|
||||
rows.Close()
|
||||
_ = rows.Close()
|
||||
|
||||
// 3. Convert issues to tombstones (only for issues that exist)
|
||||
now := time.Now()
|
||||
|
||||
Reference in New Issue
Block a user