From 288075c72433b2d5948f24b1820f7ada8aabd0d8 Mon Sep 17 00:00:00 2001 From: Renovate Bot Date: Sat, 1 Jun 2024 02:07:47 +0000 Subject: [PATCH 1/2] Update module github.com/golangci/golangci-lint/cmd/golangci-lint to v1.59.0 --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index d6838a7adf..e6686bafe7 100644 --- a/Makefile +++ b/Makefile @@ -29,7 +29,7 @@ XGO_VERSION := go-1.21.x AIR_PACKAGE ?= github.com/cosmtrek/air@v1 # renovate: datasource=go EDITORCONFIG_CHECKER_PACKAGE ?= github.com/editorconfig-checker/editorconfig-checker/v2/cmd/editorconfig-checker@2.8.0 # renovate: datasource=go GOFUMPT_PACKAGE ?= mvdan.cc/gofumpt@v0.6.0 # renovate: datasource=go -GOLANGCI_LINT_PACKAGE ?= github.com/golangci/golangci-lint/cmd/golangci-lint@v1.58.2 # renovate: datasource=go +GOLANGCI_LINT_PACKAGE ?= github.com/golangci/golangci-lint/cmd/golangci-lint@v1.59.0 # renovate: datasource=go GXZ_PACKAGE ?= github.com/ulikunitz/xz/cmd/gxz@v0.5.11 # renovate: datasource=go MISSPELL_PACKAGE ?= github.com/golangci/misspell/cmd/misspell@v0.5.1 # renovate: datasource=go SWAGGER_PACKAGE ?= github.com/go-swagger/go-swagger/cmd/swagger@v0.31.0 # renovate: datasource=go From 6d712590f1741248bfa6e45d307379f2a89c5b75 Mon Sep 17 00:00:00 2001 From: Earl Warren Date: Sat, 1 Jun 2024 16:17:07 +0200 Subject: [PATCH 2/2] chore(lint): make golangci-lint to v1.59.0 happy --- services/gitdiff/gitdiff.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/services/gitdiff/gitdiff.go b/services/gitdiff/gitdiff.go index c4430339e2..e6cae04db4 100644 --- a/services/gitdiff/gitdiff.go +++ b/services/gitdiff/gitdiff.go @@ -1057,7 +1057,7 @@ func readFileName(rd *strings.Reader) (string, bool) { char, _ := rd.ReadByte() _ = rd.UnreadByte() if char == '"' { - fmt.Fscanf(rd, "%q ", &name) + _, _ = fmt.Fscanf(rd, "%q ", &name) if len(name) == 0 { log.Error("Reader has no file name: reader=%+v", rd) return "", true @@ -1069,12 +1069,12 @@ func readFileName(rd *strings.Reader) (string, bool) { } else { // This technique is potentially ambiguous it may not be possible to uniquely identify the filenames from the diff line alone ambiguity = true - fmt.Fscanf(rd, "%s ", &name) + _, _ = fmt.Fscanf(rd, "%s ", &name) char, _ := rd.ReadByte() _ = rd.UnreadByte() for !(char == 0 || char == '"' || char == 'b') { var suffix string - fmt.Fscanf(rd, "%s ", &suffix) + _, _ = fmt.Fscanf(rd, "%s ", &suffix) name += " " + suffix char, _ = rd.ReadByte() _ = rd.UnreadByte()