Skip to content

Commit 604d2d0

Browse files
authored
Merge pull request moby#5314 from tonistiigi/golangci-verify-1.61
hack: update golangci-lint to 1.61
2 parents c9d08dd + 87e0f4b commit 604d2d0

File tree

6 files changed

+7
-6
lines changed

6 files changed

+7
-6
lines changed

.golangci.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,7 @@ linters-settings:
9393
- G402 # TLS MinVersion too low
9494
- G504 # Import blocklist: net/http/cgi
9595
- G601 # Implicit memory aliasing in for loop (false positives)
96+
- G115 # integer overflow conversion (TODO: verify these)
9697
config:
9798
G306: "0644"
9899
testifylint:

cache/contenthash/tarsum.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,10 +37,10 @@ func v0TarHeaderSelect(h *tar.Header) (orderedHeaders [][2]string) {
3737

3838
func v1TarHeaderSelect(h *tar.Header) (orderedHeaders [][2]string) {
3939
pax := h.PAXRecords
40-
if len(h.Xattrs) > 0 { // field deprecated in stdlib
40+
if len(h.Xattrs) > 0 { //nolint:staticcheck // field deprecated in stdlib
4141
if pax == nil {
4242
pax = map[string]string{}
43-
for k, v := range h.Xattrs { // field deprecated in stdlib
43+
for k, v := range h.Xattrs { //nolint:staticcheck // field deprecated in stdlib
4444
pax["SCHILY.xattr."+k] = v
4545
}
4646
}

hack/dockerfiles/lint.Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ ARG GO_VERSION=1.22
44
ARG ALPINE_VERSION=3.20
55
ARG XX_VERSION=1.4.0
66
ARG PROTOLINT_VERSION=0.45.0
7-
ARG GOLANGCI_LINT_VERSION=1.60.1
7+
ARG GOLANGCI_LINT_VERSION=1.61.0
88
ARG GOPLS_VERSION=v0.20.0
99
# disabled: deprecated unusedvariable simplifyrange
1010
ARG GOPLS_ANALYZERS="embeddirective fillreturns infertypeargs nonewvars noresultvalues simplifycompositelit simplifyslice stubmethods undeclaredname unusedparams useany"

solver/testutil/cachestorage_testsuite.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -385,7 +385,7 @@ func testWalkIDsByResult(t *testing.T, st solver.CacheKeyStorage) {
385385
func getFunctionName(i interface{}) string {
386386
fullname := runtime.FuncForPC(reflect.ValueOf(i).Pointer()).Name()
387387
dot := strings.LastIndex(fullname, ".") + 1
388-
return strings.Title(fullname[dot:]) // ignoring "SA1019: strings.Title is deprecated", as for our use we don't need full unicode support
388+
return strings.Title(fullname[dot:]) //nolint:staticcheck // ignoring "SA1019: strings.Title is deprecated", as for our use we don't need full unicode support
389389
}
390390

391391
func rootKey(dgst digest.Digest, output solver.Index) digest.Digest {

util/resolver/retryhandler/retry.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ func retryError(err error) bool {
6464
return true
6565
}
6666
// catches TLS timeout or other network-related temporary errors
67-
if ne := net.Error(nil); errors.As(err, &ne) && ne.Temporary() { // ignoring "SA1019: Temporary is deprecated", continue to propagate net.Error through the "temporary" status
67+
if ne := net.Error(nil); errors.As(err, &ne) && ne.Temporary() { //nolint:staticcheck // ignoring "SA1019: Temporary is deprecated", continue to propagate net.Error through the "temporary" status
6868
return true
6969
}
7070

util/testutil/integration/run.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,7 @@ func Run(t *testing.T, testCases []Test, opt ...TestOpt) {
220220
func getFunctionName(i interface{}) string {
221221
fullname := runtime.FuncForPC(reflect.ValueOf(i).Pointer()).Name()
222222
dot := strings.LastIndex(fullname, ".") + 1
223-
return strings.Title(fullname[dot:]) // ignoring "SA1019: strings.Title is deprecated", as for our use we don't need full unicode support
223+
return strings.Title(fullname[dot:]) //nolint:staticcheck // ignoring "SA1019: strings.Title is deprecated", as for our use we don't need full unicode support
224224
}
225225

226226
var localImageCache map[string]map[string]struct{}

0 commit comments

Comments
 (0)