From a63500663ac0b01e14b30bafc5b5c104c39f72ad Mon Sep 17 00:00:00 2001 From: Michael Eischer Date: Tue, 28 Jan 2025 19:51:12 +0100 Subject: [PATCH 1/3] CI: disable shadow builtin rule Removing the shadowing cases leads to weird workarounds but doesn't help much with code clarity. --- .golangci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.golangci.yml b/.golangci.yml index e632965bb..b415e1f56 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -56,6 +56,7 @@ issues: # staticcheck: there's no easy way to replace these packages - "SA1019: \"golang.org/x/crypto/poly1305\" is deprecated" - "SA1019: \"golang.org/x/crypto/openpgp\" is deprecated" + - "redefines-builtin-id:" exclude-rules: # revive: ignore unused parameters in tests From e77681f2cdbcc844c6d7a0987027270d2d9e2267 Mon Sep 17 00:00:00 2001 From: Michael Eischer Date: Tue, 28 Jan 2025 19:52:22 +0100 Subject: [PATCH 2/3] remove unnecessary min function --- internal/repository/packer_manager_test.go | 7 ------- 1 file changed, 7 deletions(-) diff --git a/internal/repository/packer_manager_test.go b/internal/repository/packer_manager_test.go index 0f3aea05f..bcc494075 100644 --- a/internal/repository/packer_manager_test.go +++ b/internal/repository/packer_manager_test.go @@ -23,13 +23,6 @@ func randomID(rd io.Reader) restic.ID { const maxBlobSize = 1 << 20 -func min(a, b int) int { - if a < b { - return a - } - return b -} - func fillPacks(t testing.TB, rnd *rand.Rand, pm *packerManager, buf []byte) (bytes int) { for i := 0; i < 102; i++ { l := rnd.Intn(maxBlobSize) From 8eaa4b6602902bef4e41bb0b11483628a02c4a78 Mon Sep 17 00:00:00 2001 From: Michael Eischer Date: Tue, 28 Jan 2025 19:55:45 +0100 Subject: [PATCH 3/3] CI: bump golangci-lint to v1.63.4 --- .github/workflows/tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 5a41723bb..d28d2e46f 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -259,7 +259,7 @@ jobs: uses: golangci/golangci-lint-action@v6 with: # Required: the version of golangci-lint is required and must be specified without patch version: we always use the latest patch version. - version: v1.61.0 + version: v1.63.4 args: --verbose --timeout 5m # only run golangci-lint for pull requests, otherwise ALL hints get