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>
This commit is contained in:
@@ -126,7 +126,7 @@ func ExpiredTombstones(path string) error {
|
|||||||
issue.SetDefaults()
|
issue.SetDefaults()
|
||||||
allIssues = append(allIssues, &issue)
|
allIssues = append(allIssues, &issue)
|
||||||
}
|
}
|
||||||
file.Close()
|
_ = file.Close()
|
||||||
|
|
||||||
ttl := types.DefaultTombstoneTTL
|
ttl := types.DefaultTombstoneTTL
|
||||||
|
|
||||||
@@ -156,16 +156,16 @@ func ExpiredTombstones(path string) error {
|
|||||||
encoder := json.NewEncoder(tempFile)
|
encoder := json.NewEncoder(tempFile)
|
||||||
for _, issue := range kept {
|
for _, issue := range kept {
|
||||||
if err := encoder.Encode(issue); err != nil {
|
if err := encoder.Encode(issue); err != nil {
|
||||||
tempFile.Close()
|
_ = tempFile.Close()
|
||||||
os.Remove(tempPath)
|
_ = os.Remove(tempPath)
|
||||||
return fmt.Errorf("failed to write issue %s: %w", issue.ID, err)
|
return fmt.Errorf("failed to write issue %s: %w", issue.ID, err)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
tempFile.Close()
|
_ = tempFile.Close()
|
||||||
|
|
||||||
// Atomically replace
|
// Atomically replace
|
||||||
if err := os.Rename(tempPath, jsonlPath); err != nil {
|
if err := os.Rename(tempPath, jsonlPath); err != nil {
|
||||||
os.Remove(tempPath)
|
_ = os.Remove(tempPath)
|
||||||
return fmt.Errorf("failed to replace issues.jsonl: %w", err)
|
return fmt.Errorf("failed to replace issues.jsonl: %w", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -268,7 +268,7 @@ var blockedCmd = &cobra.Command{
|
|||||||
}
|
}
|
||||||
|
|
||||||
// runMoleculeReady shows ready steps within a specific molecule
|
// runMoleculeReady shows ready steps within a specific molecule
|
||||||
func runMoleculeReady(cmd *cobra.Command, molIDArg string) {
|
func runMoleculeReady(_ *cobra.Command, molIDArg string) {
|
||||||
ctx := rootCtx
|
ctx := rootCtx
|
||||||
|
|
||||||
// Molecule-ready requires direct store access for subgraph loading
|
// Molecule-ready requires direct store access for subgraph loading
|
||||||
|
|||||||
@@ -20,7 +20,7 @@
|
|||||||
// Gate types: "all-children" (default, blocked until ALL close) or "any-children" (until ANY closes).
|
// 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
|
// 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.
|
// If A succeeds (closed without failure), B stays blocked.
|
||||||
//
|
//
|
||||||
// The cache is maintained automatically by invalidating and rebuilding whenever:
|
// 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
|
// - 'parent-child': Propagates blockage to children
|
||||||
//
|
//
|
||||||
// Failure close reasons are detected by matching keywords in close_reason:
|
// 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
|
// blocked, error, timeout, aborted
|
||||||
query := `
|
query := `
|
||||||
INSERT INTO blocked_issues_cache (issue_id)
|
INSERT INTO blocked_issues_cache (issue_id)
|
||||||
|
|||||||
@@ -434,8 +434,8 @@ var FailureCloseKeywords = []string{
|
|||||||
"rejected",
|
"rejected",
|
||||||
"wontfix",
|
"wontfix",
|
||||||
"won't fix",
|
"won't fix",
|
||||||
"cancelled",
|
|
||||||
"canceled",
|
"canceled",
|
||||||
|
"cancelled", //nolint:misspell // British spelling intentionally included
|
||||||
"abandoned",
|
"abandoned",
|
||||||
"blocked",
|
"blocked",
|
||||||
"error",
|
"error",
|
||||||
|
|||||||
Reference in New Issue
Block a user