Skip to content

Minor cleanups from a staticcheck pass#366

Merged
folbricht merged 1 commit into
masterfrom
minor-cleanups
Jul 5, 2026
Merged

Minor cleanups from a staticcheck pass#366
folbricht merged 1 commit into
masterfrom
minor-cleanups

Conversation

@folbricht

Copy link
Copy Markdown
Owner

A collection of small fixes surfaced by staticcheck and review; staticcheck ./... is clean after this.

  • Dropped test errors checked: assemble_test.go ignored the error from NewIndexSeed(), and cmd/desync/options_test.go ignored the error from the first GetStoreOptionsFor() call in two tests (SA4006). These could have masked failures.
  • SFTPStore.RemoveChunk error mapping: any Stat failure — including connection or permission errors — was reported as ChunkMissing. Only map actual not-found errors; return everything else as-is. This matters for verify -repair against an SFTP store, where a dropped connection previously looked like a missing chunk.
  • Dead fields removed: DedupQueue.mu (the real locking lives in the inner queue type) and fileSeedSegment.needValidation (U1000).
  • Style: replace an append loop with append(l, stores...) (S1011), lowercase two error strings (ST1005).

- Check previously dropped errors from NewIndexSeed and
  GetStoreOptionsFor in tests, which could have masked test failures
- SFTPStore.RemoveChunk no longer reports connection or permission
  errors from Stat as ChunkMissing, only actual missing files
- Remove the unused DedupQueue.mu and fileSeedSegment.needValidation
  fields
- Simplify the append loop in NewStoreRouter
- Lowercase two error strings in cmd/desync/store.go
@folbricht folbricht merged commit 774c18e into master Jul 5, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant