golangci-lint update, ci cleanup, group dependabot updates (#11071)

* bump golangci-lint to v1.56.x

Signed-off-by: cpanato <ctadeu@gmail.com>

* cleanup empty lines

Signed-off-by: cpanato <ctadeu@gmail.com>

* group dependabot updates

Signed-off-by: cpanato <ctadeu@gmail.com>

* run on job changes as well

Signed-off-by: cpanato <ctadeu@gmail.com>

* remove deprecated checks

Signed-off-by: cpanato <ctadeu@gmail.com>

* fix lints and format

Signed-off-by: cpanato <ctadeu@gmail.com>

---------

Signed-off-by: cpanato <ctadeu@gmail.com>
This commit is contained in:
Carlos Tadeu Panato Junior 2024-03-07 11:39:53 +01:00 committed by GitHub
parent 0e11470ef3
commit 12fbe9b163
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
45 changed files with 96 additions and 100 deletions

View file

@ -102,7 +102,7 @@ func (f *Framework) NamespaceContent() (string, error) {
}
eout := strings.TrimSpace(execErr.String())
if len(eout) > 0 {
if eout != "" {
return "", fmt.Errorf("stderr: %v", eout)
}

View file

@ -313,7 +313,7 @@ func (f *Framework) matchNginxConditions(name string, matcher func(cfg string) b
return false, nil
}
if klog.V(10).Enabled() && len(o) > 0 {
if klog.V(10).Enabled() && o != "" {
klog.InfoS("NGINX", "configuration", o)
}
@ -335,7 +335,7 @@ func (f *Framework) matchNginxCustomConditions(from, to string, matcher func(cfg
return false, nil
}
if klog.V(10).Enabled() && len(o) > 0 {
if klog.V(10).Enabled() && o != "" {
klog.InfoS("NGINX", "configuration", o)
}
@ -501,7 +501,7 @@ func (f *Framework) newHTTPTestClient(config *tls.Config, setIngressURL bool) *h
Transport: &http.Transport{
TLSClientConfig: config,
},
CheckRedirect: func(req *http.Request, via []*http.Request) error {
CheckRedirect: func(_ *http.Request, _ []*http.Request) error {
return http.ErrUseLastResponse
},
}, httpexpect.NewAssertReporter())

View file

@ -93,7 +93,7 @@ func (h *HTTPRequest) ForceResolve(ip string, port uint16) *HTTPRequest {
return h
}
newTransport := oldTransport.Clone()
newTransport.DialContext = func(ctx context.Context, network, addr string) (net.Conn, error) {
newTransport.DialContext = func(ctx context.Context, network, _ string) (net.Conn, error) {
return dialer.DialContext(ctx, network, resolveAddr)
}
h.client.Transport = newTransport