Skip to content

Commit

Permalink
Merge pull request #5314 from tonistiigi/golangci-verify-1.61
Browse files Browse the repository at this point in the history
hack: update golangci-lint to 1.61
  • Loading branch information
AkihiroSuda authored Sep 9, 2024
2 parents c9d08dd + 87e0f4b commit 604d2d0
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 6 deletions.
1 change: 1 addition & 0 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ linters-settings:
- G402 # TLS MinVersion too low
- G504 # Import blocklist: net/http/cgi
- G601 # Implicit memory aliasing in for loop (false positives)
- G115 # integer overflow conversion (TODO: verify these)
config:
G306: "0644"
testifylint:
Expand Down
4 changes: 2 additions & 2 deletions cache/contenthash/tarsum.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,10 @@ func v0TarHeaderSelect(h *tar.Header) (orderedHeaders [][2]string) {

func v1TarHeaderSelect(h *tar.Header) (orderedHeaders [][2]string) {
pax := h.PAXRecords
if len(h.Xattrs) > 0 { // field deprecated in stdlib
if len(h.Xattrs) > 0 { //nolint:staticcheck // field deprecated in stdlib
if pax == nil {
pax = map[string]string{}
for k, v := range h.Xattrs { // field deprecated in stdlib
for k, v := range h.Xattrs { //nolint:staticcheck // field deprecated in stdlib
pax["SCHILY.xattr."+k] = v
}
}
Expand Down
2 changes: 1 addition & 1 deletion hack/dockerfiles/lint.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ ARG GO_VERSION=1.22
ARG ALPINE_VERSION=3.20
ARG XX_VERSION=1.4.0
ARG PROTOLINT_VERSION=0.45.0
ARG GOLANGCI_LINT_VERSION=1.60.1
ARG GOLANGCI_LINT_VERSION=1.61.0
ARG GOPLS_VERSION=v0.20.0
# disabled: deprecated unusedvariable simplifyrange
ARG GOPLS_ANALYZERS="embeddirective fillreturns infertypeargs nonewvars noresultvalues simplifycompositelit simplifyslice stubmethods undeclaredname unusedparams useany"
Expand Down
2 changes: 1 addition & 1 deletion solver/testutil/cachestorage_testsuite.go
Original file line number Diff line number Diff line change
Expand Up @@ -385,7 +385,7 @@ func testWalkIDsByResult(t *testing.T, st solver.CacheKeyStorage) {
func getFunctionName(i interface{}) string {
fullname := runtime.FuncForPC(reflect.ValueOf(i).Pointer()).Name()
dot := strings.LastIndex(fullname, ".") + 1
return strings.Title(fullname[dot:]) // ignoring "SA1019: strings.Title is deprecated", as for our use we don't need full unicode support
return strings.Title(fullname[dot:]) //nolint:staticcheck // ignoring "SA1019: strings.Title is deprecated", as for our use we don't need full unicode support
}

func rootKey(dgst digest.Digest, output solver.Index) digest.Digest {
Expand Down
2 changes: 1 addition & 1 deletion util/resolver/retryhandler/retry.go
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ func retryError(err error) bool {
return true
}
// catches TLS timeout or other network-related temporary errors
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
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
return true
}

Expand Down
2 changes: 1 addition & 1 deletion util/testutil/integration/run.go
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ func Run(t *testing.T, testCases []Test, opt ...TestOpt) {
func getFunctionName(i interface{}) string {
fullname := runtime.FuncForPC(reflect.ValueOf(i).Pointer()).Name()
dot := strings.LastIndex(fullname, ".") + 1
return strings.Title(fullname[dot:]) // ignoring "SA1019: strings.Title is deprecated", as for our use we don't need full unicode support
return strings.Title(fullname[dot:]) //nolint:staticcheck // ignoring "SA1019: strings.Title is deprecated", as for our use we don't need full unicode support
}

var localImageCache map[string]map[string]struct{}
Expand Down

0 comments on commit 604d2d0

Please sign in to comment.