Skip to content

Commit 8b49d8f

Browse files
steveyeggeclaude
andcommitted
fix: resolve golangci-lint errors
- Add _ = prefix for ignored Close/Remove return values - Fix unused cmd parameter in runMoleculeReady - Add nolint:misspell for intentional British "cancelled" spelling - Update comments to use US spelling where not intentional 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent fcf5e6a commit 8b49d8f

File tree

4 files changed

+9
-9
lines changed

4 files changed

+9
-9
lines changed

cmd/bd/doctor/fix/maintenance.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ func ExpiredTombstones(path string) error {
126126
issue.SetDefaults()
127127
allIssues = append(allIssues, &issue)
128128
}
129-
file.Close()
129+
_ = file.Close()
130130

131131
ttl := types.DefaultTombstoneTTL
132132

@@ -156,16 +156,16 @@ func ExpiredTombstones(path string) error {
156156
encoder := json.NewEncoder(tempFile)
157157
for _, issue := range kept {
158158
if err := encoder.Encode(issue); err != nil {
159-
tempFile.Close()
160-
os.Remove(tempPath)
159+
_ = tempFile.Close()
160+
_ = os.Remove(tempPath)
161161
return fmt.Errorf("failed to write issue %s: %w", issue.ID, err)
162162
}
163163
}
164-
tempFile.Close()
164+
_ = tempFile.Close()
165165

166166
// Atomically replace
167167
if err := os.Rename(tempPath, jsonlPath); err != nil {
168-
os.Remove(tempPath)
168+
_ = os.Remove(tempPath)
169169
return fmt.Errorf("failed to replace issues.jsonl: %w", err)
170170
}
171171

cmd/bd/ready.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -268,7 +268,7 @@ var blockedCmd = &cobra.Command{
268268
}
269269

270270
// runMoleculeReady shows ready steps within a specific molecule
271-
func runMoleculeReady(cmd *cobra.Command, molIDArg string) {
271+
func runMoleculeReady(_ *cobra.Command, molIDArg string) {
272272
ctx := rootCtx
273273

274274
// Molecule-ready requires direct store access for subgraph loading

internal/storage/sqlite/blocked_cache.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
// Gate types: "all-children" (default, blocked until ALL close) or "any-children" (until ANY closes).
2121
//
2222
// Conditional blocks (bd-kzda): B runs only if A fails. B is blocked until A is closed
23-
// with a failure close reason (failed, rejected, wontfix, cancelled, abandoned, etc.).
23+
// with a failure close reason (failed, rejected, wontfix, canceled, abandoned, etc.).
2424
// If A succeeds (closed without failure), B stays blocked.
2525
//
2626
// The cache is maintained automatically by invalidating and rebuilding whenever:
@@ -132,7 +132,7 @@ func (s *SQLiteStorage) rebuildBlockedCache(ctx context.Context, exec execer) er
132132
// - 'parent-child': Propagates blockage to children
133133
//
134134
// Failure close reasons are detected by matching keywords in close_reason:
135-
// failed, rejected, wontfix, won't fix, cancelled, canceled, abandoned,
135+
// failed, rejected, wontfix, won't fix, canceled, abandoned,
136136
// blocked, error, timeout, aborted
137137
query := `
138138
INSERT INTO blocked_issues_cache (issue_id)

internal/types/types.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -434,8 +434,8 @@ var FailureCloseKeywords = []string{
434434
"rejected",
435435
"wontfix",
436436
"won't fix",
437-
"cancelled",
438437
"canceled",
438+
"cancelled", //nolint:misspell // British spelling intentionally included
439439
"abandoned",
440440
"blocked",
441441
"error",

0 commit comments

Comments
 (0)