Skip to content

Commit

Permalink
upgrade golangci-lint, fix superflous else, ignore unused-parameter i…
Browse files Browse the repository at this point in the history
…ssues

Signed-off-by: Matt Trachier <matttrach@gmail.com>
Co-authored-by: Derek Nola <derek.nola@suse.com>
  • Loading branch information
matttrach and dereknola committed Mar 30, 2023
1 parent 7bc904a commit 2e007ae
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
4 changes: 4 additions & 0 deletions .golangci.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@
{
"linters": "revive",
"text": "should have comment"
},
{
"linters": "revive",
"text": "unused-parameter"
}
]
}
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile.dapper
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ RUN GOPROXY=direct go install golang.org/x/tools/cmd/goimports@gopls/v0.9.5
RUN rm -rf /go/src /go/pkg

RUN if [ "${ARCH}" == "amd64" ]; then \
curl -sL https://raw.githubusercontent.com/golangci/golangci-lint/v1.50.0/install.sh | sh -s; \
curl -sL https://raw.githubusercontent.com/golangci/golangci-lint/v1.52.2/install.sh | sh -s; \
fi

ENV DAPPER_RUN_ARGS --privileged -v kine-cache:/go/src/github.com/k3s-io/kine/.cache
Expand Down
7 changes: 3 additions & 4 deletions pkg/logstructured/sqllog/sql.go
Original file line number Diff line number Diff line change
Expand Up @@ -149,11 +149,10 @@ outer:
// last iteration because another client has compacted, or the requested revision has already been compacted.
if err == server.ErrCompacted {
break
} else {
logrus.Errorf("Compact failed: %v", err)
metrics.CompactTotal.WithLabelValues(metrics.ResultError).Inc()
continue outer
}
logrus.Errorf("Compact failed: %v", err)
metrics.CompactTotal.WithLabelValues(metrics.ResultError).Inc()
continue outer
}
}

Expand Down

0 comments on commit 2e007ae

Please sign in to comment.