From c71b0355052a9d7fbbd8472a5df35ca86ec281bb Mon Sep 17 00:00:00 2001 From: Adam Hughes <9903835+tri-adam@users.noreply.github.com> Date: Fri, 15 Nov 2024 16:18:11 +0000 Subject: [PATCH] chore: bump golangci-lint to v1.62 Fix revive lint (redefinition of the built-in type any), and add iface linter. --- .circleci/config.yml | 2 +- .golangci.yml | 1 + pkg/integrity/verify.go | 8 ++++---- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 52d1fd5..18c6e6d 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -9,7 +9,7 @@ executors: - image: node:22-slim golangci-lint: docker: - - image: golangci/golangci-lint:v1.61 + - image: golangci/golangci-lint:v1.62 golang-previous: docker: - image: golang:1.22 diff --git a/.golangci.yml b/.golangci.yml index f7acdfd..50edc48 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -29,6 +29,7 @@ linters: - gosimple - govet - grouper + - iface - ineffassign - interfacebloat - intrange diff --git a/pkg/integrity/verify.go b/pkg/integrity/verify.go index e45afcb..5a64267 100644 --- a/pkg/integrity/verify.go +++ b/pkg/integrity/verify.go @@ -538,9 +538,9 @@ func NewVerifier(f *sif.FileImage, opts ...VerifierOpt) (*Verifier, error) { } // fingerprints returns a sorted list of unique fingerprints of entities participating in the -// verification tasks in v. If any is true, entities involved in at least one task are included. -// Otherwise, only entities participatinging in all tasks are included. -func (v *Verifier) fingerprints(any bool) ([][]byte, error) { +// verification tasks in v. If anyTask is true, entities involved in at least one task are +// included. Otherwise, only entities participatinging in all tasks are included. +func (v *Verifier) fingerprints(anyTask bool) ([][]byte, error) { m := make(map[string]int) // Build up a map containing fingerprints, and the number of tasks they are participating in. @@ -563,7 +563,7 @@ func (v *Verifier) fingerprints(any bool) ([][]byte, error) { // Build up list of fingerprints. var fps [][]byte for fp, n := range m { - if any || len(v.tasks) == n { + if anyTask || len(v.tasks) == n { b, err := hex.DecodeString(fp) if err != nil { panic(err)