diff --git a/.gitlab/ci/.code-quality-ci.yml b/.gitlab/ci/.code-quality-ci.yml index 6a9c5d3e229c7e3689bbe795a8459078ad48cf6a..3d26d7b63eaa207b9f1983168f038354d228ead7 100644 --- a/.gitlab/ci/.code-quality-ci.yml +++ b/.gitlab/ci/.code-quality-ci.yml @@ -1,5 +1,5 @@ code-quality: - image: ${CI_DEPENDENCY_PROXY_GROUP_IMAGE_PREFIX}/golangci/golangci-lint:v1.59.1-alpine + image: ${CI_DEPENDENCY_PROXY_GROUP_IMAGE_PREFIX}/golangci/golangci-lint:v1.60.2-alpine stage: analyze script: # writes golangci-lint output to gl-code-quality-report.json diff --git a/.golangci.yml b/.golangci.yml index 67e271bd5a40205ccd6bad8db07cfcc7b441bd4c..4785de7cfe76c6e564c9c110b8b2736d6c2afc84 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -1,7 +1,5 @@ -variables: - GOLANG_VERSION: "1.22" run: - go: $GOLANG_VERSION + go: "1.22" concurrency: 8 timeout: 20m issues-exit-code: 1 @@ -60,7 +58,7 @@ linters: - bidichk - durationcheck - errorlint - - exportloopref + - copyloopvar - grouper - makezero - misspell diff --git a/Makefile b/Makefile index 288f8dd941c3f969c78815aab47113f70c401a8b..6fb681e592d9fa0d8da9019475208b08afe41be3 100644 --- a/Makefile +++ b/Makefile @@ -18,7 +18,7 @@ PLUGIN_NAME= bundled_plugin.zip # Tool Versions GOTESTSUM_VERSION=v1.8.1 -GOLANGCI_LINT_VERSION=v1.59.1 +GOLANGCI_LINT_VERSION=v1.60.2 MOCKERY_VERSION=v2.20.0 YGOT_GENERATOR_VERSION=v0.27.0 YGOT_GENERATOR_GENERATOR_VERSION=v0.0.4 diff --git a/cli/adapter/PndAdapter.go b/cli/adapter/PndAdapter.go index 5797e250f13acd9555a5f6ab683f50846e2d0054..e1bd8936b36c5d83acf88f005f878d38e808a406 100644 --- a/cli/adapter/PndAdapter.go +++ b/cli/adapter/PndAdapter.go @@ -119,7 +119,6 @@ func (p *PndAdapter) RequestAll(ctx context.Context, path string) ([]proto.Messa reqResult := make([]proto.Message, len(resp.Mne)) g := new(errgroup.Group) for i, mne := range resp.Mne { - i, mne := i, mne // TODO: probably the controller should do this; this would result in a // single request from CLI side. g.Go(func() error { diff --git a/controller/version/version_test.go b/controller/version/version_test.go index 9ae0dbaa713c0c7129782c425491bbcaab8281aa..127151d3d20651b9860c629a55e35872268923b8 100644 --- a/controller/version/version_test.go +++ b/controller/version/version_test.go @@ -294,7 +294,6 @@ func Test_version_Compare(t *testing.T) { } for _, tt := range tests { - tt := tt t.Run(tt.name, func(t *testing.T) { t.Parallel() got := v.Compare(tt.args.inputVersion) @@ -385,7 +384,6 @@ func Test_version_compareVersionSegment(t *testing.T) { } for _, tt := range tests { - tt := tt t.Run(tt.name, func(t *testing.T) { t.Parallel() got := compareVersionSegment(tt.args.left, tt.args.right) @@ -451,7 +449,6 @@ func Test_version_parseVersionString(t *testing.T) { } for _, tt := range tests { - tt := tt t.Run(tt.name, func(t *testing.T) { t.Parallel() got, err := parseVersionString(tt.args.input)