diff --git a/cmd/bd/doctor/fix/maintenance.go b/cmd/bd/doctor/fix/maintenance.go index deb9a6c9..7eb08156 100644 --- a/cmd/bd/doctor/fix/maintenance.go +++ b/cmd/bd/doctor/fix/maintenance.go @@ -126,7 +126,7 @@ func ExpiredTombstones(path string) error { issue.SetDefaults() allIssues = append(allIssues, &issue) } - file.Close() + _ = file.Close() ttl := types.DefaultTombstoneTTL @@ -156,16 +156,16 @@ func ExpiredTombstones(path string) error { encoder := json.NewEncoder(tempFile) for _, issue := range kept { if err := encoder.Encode(issue); err != nil { - tempFile.Close() - os.Remove(tempPath) + _ = tempFile.Close() + _ = os.Remove(tempPath) return fmt.Errorf("failed to write issue %s: %w", issue.ID, err) } } - tempFile.Close() + _ = tempFile.Close() // Atomically replace if err := os.Rename(tempPath, jsonlPath); err != nil { - os.Remove(tempPath) + _ = os.Remove(tempPath) return fmt.Errorf("failed to replace issues.jsonl: %w", err) } diff --git a/cmd/bd/ready.go b/cmd/bd/ready.go index 494c3b89..07cb841e 100644 --- a/cmd/bd/ready.go +++ b/cmd/bd/ready.go @@ -268,7 +268,7 @@ var blockedCmd = &cobra.Command{ } // runMoleculeReady shows ready steps within a specific molecule -func runMoleculeReady(cmd *cobra.Command, molIDArg string) { +func runMoleculeReady(_ *cobra.Command, molIDArg string) { ctx := rootCtx // Molecule-ready requires direct store access for subgraph loading diff --git a/internal/storage/sqlite/blocked_cache.go b/internal/storage/sqlite/blocked_cache.go index 1fbaab58..5dbf4551 100644 --- a/internal/storage/sqlite/blocked_cache.go +++ b/internal/storage/sqlite/blocked_cache.go @@ -20,7 +20,7 @@ // Gate types: "all-children" (default, blocked until ALL close) or "any-children" (until ANY closes). // // Conditional blocks (bd-kzda): B runs only if A fails. B is blocked until A is closed -// with a failure close reason (failed, rejected, wontfix, cancelled, abandoned, etc.). +// with a failure close reason (failed, rejected, wontfix, canceled, abandoned, etc.). // If A succeeds (closed without failure), B stays blocked. // // The cache is maintained automatically by invalidating and rebuilding whenever: @@ -132,7 +132,7 @@ func (s *SQLiteStorage) rebuildBlockedCache(ctx context.Context, exec execer) er // - 'parent-child': Propagates blockage to children // // Failure close reasons are detected by matching keywords in close_reason: - // failed, rejected, wontfix, won't fix, cancelled, canceled, abandoned, + // failed, rejected, wontfix, won't fix, canceled, abandoned, // blocked, error, timeout, aborted query := ` INSERT INTO blocked_issues_cache (issue_id) diff --git a/internal/types/types.go b/internal/types/types.go index adaf8660..4f3606bd 100644 --- a/internal/types/types.go +++ b/internal/types/types.go @@ -434,8 +434,8 @@ var FailureCloseKeywords = []string{ "rejected", "wontfix", "won't fix", - "cancelled", "canceled", + "cancelled", //nolint:misspell // British spelling intentionally included "abandoned", "blocked", "error",