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:
parent
0e11470ef3
commit
12fbe9b163
45 changed files with 96 additions and 100 deletions
|
|
@ -59,7 +59,7 @@ func TestAdmissionCounters(t *testing.T) {
|
|||
}{
|
||||
{
|
||||
name: "should return 0 as values on a fresh initiated collector",
|
||||
test: func(am *AdmissionCollector) {
|
||||
test: func(_ *AdmissionCollector) {
|
||||
},
|
||||
want: metadataFirst + `
|
||||
nginx_ingress_controller_admission_config_size{controller_class="nginx",controller_namespace="default",controller_pod="pod"} 0
|
||||
|
|
|
|||
|
|
@ -42,7 +42,7 @@ func TestControllerCounters(t *testing.T) {
|
|||
}{
|
||||
{
|
||||
name: "should return not increment in metrics if no operations are invoked",
|
||||
test: func(cm *Controller) {
|
||||
test: func(_ *Controller) {
|
||||
},
|
||||
want: metadata + `
|
||||
nginx_ingress_controller_config_last_reload_successful{controller_class="nginx",controller_namespace="default",controller_pod="pod"} 0
|
||||
|
|
|
|||
|
|
@ -329,7 +329,7 @@ func (sc *SocketCollector) handleMessage(msg []byte) {
|
|||
continue
|
||||
}
|
||||
|
||||
if sc.reportStatusClasses && len(stats.Status) > 0 {
|
||||
if sc.reportStatusClasses && stats.Status != "" {
|
||||
stats.Status = fmt.Sprintf("%cxx", stats.Status[0])
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -30,8 +30,7 @@ import (
|
|||
func TestNewUDPLogListener(t *testing.T) {
|
||||
var count uint64
|
||||
|
||||
//nolint:unparam // Unused `message` param is required by the handleMessages function
|
||||
fn := func(message []byte) {
|
||||
fn := func(message []byte) { //nolint:unparam,revive // Unused `message` param is required by the handleMessages function
|
||||
atomic.AddUint64(&count, 1)
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -109,7 +109,7 @@ func removeUnusedWhitespace(s string) string {
|
|||
for _, l := range lines {
|
||||
trimmedLine = strings.TrimSpace(l)
|
||||
|
||||
if len(trimmedLine) > 0 {
|
||||
if trimmedLine != "" {
|
||||
trimmedLines = append(trimmedLines, trimmedLine)
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue