Skip to content

Commit c953d28

Browse files
committed
golangci-lint: bump to 1.52.2 and fix errors
Signed-off-by: Peter Hunt <pehunt@redhat.com>
1 parent 8d781b8 commit c953d28

File tree

3 files changed

+8
-9
lines changed

3 files changed

+8
-9
lines changed

.golangci.yml

+1-4
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ run:
55
linters:
66
disable-all: true
77
enable:
8-
- deadcode
98
- depguard
109
- durationcheck
1110
- forcetypeassert
@@ -21,11 +20,10 @@ linters:
2120
- prealloc
2221
- predeclared
2322
- promlinter
24-
- structcheck
2523
- tagliatelle
2624
- typecheck
27-
- varcheck
2825
- wastedassign
26+
- unused
2927
# - asciicheck
3028
# - bodyclose
3129
# - cyclop
@@ -75,7 +73,6 @@ linters:
7573
# - tparallel
7674
# - unconvert
7775
# - unparam
78-
# - unused
7976
# - whitespace
8077
# - wrapcheck
8178
# - wsl

Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ install.lint: $(GOLANGCI_LINT)
112112

113113
$(GOLANGCI_LINT):
114114
export \
115-
VERSION=v1.46.2 \
115+
VERSION=v1.52.2 \
116116
URL=https://raw.githubusercontent.com/golangci/golangci-lint \
117117
BINDIR=${BUILD_BIN_PATH} && \
118118
curl -sfL $$URL/$$VERSION/install.sh | sh -s $$VERSION

pkg/validate/container.go

+6-4
Original file line numberDiff line numberDiff line change
@@ -573,8 +573,9 @@ func pathExists(path string) bool {
573573

574574
// parseDockerJSONLog parses logs in Docker JSON log format.
575575
// Docker JSON log format example:
576-
// {"log":"content 1","stream":"stdout","time":"2016-10-20T18:39:20.57606443Z"}
577-
// {"log":"content 2","stream":"stderr","time":"2016-10-20T18:39:20.57606444Z"}
576+
//
577+
// {"log":"content 1","stream":"stdout","time":"2016-10-20T18:39:20.57606443Z"}
578+
// {"log":"content 2","stream":"stderr","time":"2016-10-20T18:39:20.57606444Z"}
578579
func parseDockerJSONLog(log []byte, msg *logMessage) {
579580
var l jsonlog.JSONLog
580581

@@ -588,8 +589,9 @@ func parseDockerJSONLog(log []byte, msg *logMessage) {
588589

589590
// parseCRILog parses logs in CRI log format.
590591
// CRI log format example :
591-
// 2016-10-06T00:17:09.669794202Z stdout P The content of the log entry 1
592-
// 2016-10-06T00:17:10.113242941Z stderr F The content of the log entry 2
592+
//
593+
// 2016-10-06T00:17:09.669794202Z stdout P The content of the log entry 1
594+
// 2016-10-06T00:17:10.113242941Z stderr F The content of the log entry 2
593595
func parseCRILog(log string, msg *logMessage) {
594596
logMessage := strings.SplitN(log, " ", 4)
595597
if len(log) < 4 {

0 commit comments

Comments
 (0)