From 264a5b5e0c6aac54dc75d5306ee870dd81e975ce Mon Sep 17 00:00:00 2001 From: armfazh Date: Wed, 24 Aug 2022 16:02:19 -0700 Subject: [PATCH] Bumping linter to v1.49 --- .etc/golangci.yml | 8 +++++--- .github/workflows/ci-actions.yml | 2 +- hpke/aead_test.go | 4 ++-- hpke/algs.go | 4 ++-- 4 files changed, 10 insertions(+), 8 deletions(-) diff --git a/.etc/golangci.yml b/.etc/golangci.yml index 6e594ec9a..35eae78b7 100644 --- a/.etc/golangci.yml +++ b/.etc/golangci.yml @@ -8,11 +8,15 @@ linters: # - interfacer (deprecated since v1.38.0) # - scopelint (deprecated since v1.39.0) # - golint (deprecated since v1.41.0) + # - structcheck (deprecated since v1.49.0) + # - varcheck (deprecated since v1.49.0) + # - deadcode (deprecated since v1.49.0) - bodyclose - - deadcode - depguard - dogsled - errcheck + - exportloopref + - forbidigo - funlen - gci - goconst @@ -27,13 +31,11 @@ linters: - misspell - nakedret - staticcheck - - structcheck - stylecheck - typecheck - unconvert - unparam - unused - - varcheck - whitespace linters-settings: diff --git a/.github/workflows/ci-actions.yml b/.github/workflows/ci-actions.yml index ba855fb15..52aa73243 100644 --- a/.github/workflows/ci-actions.yml +++ b/.github/workflows/ci-actions.yml @@ -23,7 +23,7 @@ jobs: - name: Linting uses: golangci/golangci-lint-action@v3 with: - version: v1.48 + version: v1.49 args: --config=./.etc/golangci.yml ./... - name: Check shadowing run: | diff --git a/hpke/aead_test.go b/hpke/aead_test.go index 718c3258b..840b8a471 100644 --- a/hpke/aead_test.go +++ b/hpke/aead_test.go @@ -157,7 +157,7 @@ func TestAeadSeqOverflow(t *testing.T) { for i := 0; i < numAttempts; i++ { ct, err := sealer.Seal(pt, aad) - switch true { + switch { case ct != nil && err == nil: gotCorrect++ case ct == nil && err != nil: @@ -167,7 +167,7 @@ func TestAeadSeqOverflow(t *testing.T) { } pt2, err := opener.Open(ct, aad) - switch true { + switch { case pt2 != nil && err == nil: gotCorrect++ case pt2 == nil && err != nil: diff --git a/hpke/algs.go b/hpke/algs.go index df78ed8e7..c7e0bc0cb 100644 --- a/hpke/algs.go +++ b/hpke/algs.go @@ -5,8 +5,8 @@ import ( "crypto/aes" "crypto/cipher" "crypto/elliptic" - _ "crypto/sha256" - _ "crypto/sha512" + _ "crypto/sha256" // Linking sha256. + _ "crypto/sha512" // Linking sha512. "fmt" "hash" "io"