Add codespell support with configuration and fixes (#21807)

Co-authored-by: Claude Code 2.1.142 / Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
Yaroslav Halchenko
2026-05-30 20:15:13 +00:00
committed by GitHub
co-authored by Claude Code 2.1.142 / Claude Opus 4.7
parent c221cd06ad
commit 451cc6c048
13 changed files with 63 additions and 11 deletions
+1 -1
View File
@@ -74,7 +74,7 @@ func (r *packerManager) Flush(ctx context.Context) error {
// mergePackers merges small pack files before those are uploaded by Flush(). The main
// purpose of this method is to reduce information leaks if a small file is backed up
// and the blobs end up in spearate pack files. If the file only consists of two blobs
// and the blobs end up in separate pack files. If the file only consists of two blobs
// this would leak the size of the individual blobs.
func (r *packerManager) mergePackers() ([]*packer, error) {
pendingPackers := []*packer{}
+1 -1
View File
@@ -342,7 +342,7 @@ func calculateTargetPacksize(opts PruneOptions, indexPack map[restic.ID]packInfo
return cmp.Compare(a.size, b.size)
})
// Using the approximatelly 3rd percentile is just a heuristic and may not always be the optimal choice.
// Using the approximately 3rd percentile is just a heuristic and may not always be the optimal choice.
// However, using a low percentile ensures that only a small fraction of the repository
// may end up being repacked. By using 80% of that perecentile or the minimum pack size,
// we ensure that no repacking happens if the repository already has no small pack files.
+1 -1
View File
@@ -133,7 +133,7 @@ func TestPruneSmall(t *testing.T) {
keep := restic.NewBlobSet()
rtest.OK(t, repo.WithBlobUploader(context.TODO(), func(ctx context.Context, uploader restic.BlobSaverWithAsync) error {
// we need a minum of 11 packfiles, each packfile will be about 5 Mb long
// we need a minimum of 11 packfiles, each packfile will be about 5 Mb long
for i := 0; i < numBlobsCreated; i++ {
buf := make([]byte, blobSize)
random.Read(buf)