docker / cli

The Docker CLI
Apache License 2.0
4.96k stars 1.94k forks source link

golangci-lint: set go version to prevent fallback to go1.17, and fix copyloopvar linting issues #5594

Closed thaJeztah closed 2 weeks ago

thaJeztah commented 2 weeks ago

GolangCI-lint attempts to deduct the Go version to lint for through the go version specified in go.mod, which we don't have, and therefore it falls back to go1.17 semantics:

level=warning msg="[linters_context] copyloopvar: this linter is disabled because the Go version (1.17) of your project is lower than Go 1.22

- How to verify it

- Description for the changelog

- A picture of a cute animal (not mandatory but encouraged)

codecov-commenter commented 2 weeks ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 59.63%. Comparing base (b45477b) to head (4a7b04d). Report is 35 commits behind head on master.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #5594 +/- ## ========================================== - Coverage 59.63% 59.63% -0.01% ========================================== Files 346 346 Lines 29214 29208 -6 ========================================== - Hits 17421 17417 -4 + Misses 10824 10822 -2 Partials 969 969 ```