Skip to content

Commit

Permalink
golangci-lint: bump to 1.52.2 and fix errors
Browse files Browse the repository at this point in the history
Signed-off-by: Peter Hunt <pehunt@redhat.com>
  • Loading branch information
haircommander committed Apr 12, 2023
1 parent 8d781b8 commit c953d28
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 9 deletions.
5 changes: 1 addition & 4 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ run:
linters:
disable-all: true
enable:
- deadcode
- depguard
- durationcheck
- forcetypeassert
Expand All @@ -21,11 +20,10 @@ linters:
- prealloc
- predeclared
- promlinter
- structcheck
- tagliatelle
- typecheck
- varcheck
- wastedassign
- unused
# - asciicheck
# - bodyclose
# - cyclop
Expand Down Expand Up @@ -75,7 +73,6 @@ linters:
# - tparallel
# - unconvert
# - unparam
# - unused
# - whitespace
# - wrapcheck
# - wsl
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ install.lint: $(GOLANGCI_LINT)

$(GOLANGCI_LINT):
export \
VERSION=v1.46.2 \
VERSION=v1.52.2 \
URL=https://raw.githubusercontent.com/golangci/golangci-lint \
BINDIR=${BUILD_BIN_PATH} && \
curl -sfL $$URL/$$VERSION/install.sh | sh -s $$VERSION
Expand Down
10 changes: 6 additions & 4 deletions pkg/validate/container.go
Original file line number Diff line number Diff line change
Expand Up @@ -573,8 +573,9 @@ func pathExists(path string) bool {

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

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

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

0 comments on commit c953d28

Please sign in to comment.