🎧 Your Personal Streaming Service
Go airsonicmadsonicmedia-servermusicmusic-servernavidromeopensubsonicraspberry-piself-hostedstreamerstreaming-apistreaming-audiosubsonicsubsonic-server
chore(lint): upgrade golangci-lint, fix/ignore new errors
Deluan556f345a10ed
diff --git a/Makefile b/Makefileindex ad96afd31..e303017c7 100644--- a/Makefile+++ b/Makefile@@ -20,7 +20,7 @@ IMAGE_PLATFORMS ?= $(shell echo $(SUPPORTED_PLATFORMS) | tr ',' '\n' | grep "linPLATFORMS ?= $(SUPPORTED_PLATFORMS)DOCKER_TAG ?= deluan/navidrome:develop-GOLANGCI_LINT_VERSION ?= v2.11.1+GOLANGCI_LINT_VERSION ?= v2.12.0UI_SRC_FILES := $(shell find ui -type f -not -path "ui/build/*" -not -path "ui/node_modules/*")diff --git a/server/subsonic/api_test.go b/server/subsonic/api_test.goindex 3b88704b1..f3053c8af 100644--- a/server/subsonic/api_test.go+++ b/server/subsonic/api_test.go@@ -156,7 +156,7 @@ var _ = Describe("sendResponse", func() {It("updates status pointer when an error occurs", func() {pointer := int32(0)- ctx := context.WithValue(r.Context(), subsonicErrorPointer, &pointer)+ ctx := context.WithValue(r.Context(), subsonicErrorPointer, &pointer) //nolint:govetr = r.WithContext(ctx)payload.Status = responses.StatusFaileddiff --git a/server/subsonic/media_retrieval.go b/server/subsonic/media_retrieval.goindex 3faae1650..9ab3a20b0 100644--- a/server/subsonic/media_retrieval.go+++ b/server/subsonic/media_retrieval.go@@ -37,7 +37,7 @@ func (api *Router) GetAvatar(w http.ResponseWriter, r *http.Request) (*responseslog.Warn(ctx, "User needs an email for gravatar to work", "username", username)return api.getPlaceHolderAvatar(w, r)}- http.Redirect(w, r, gravatar.Url(u.Email, 0), http.StatusFound)+ http.Redirect(w, r, gravatar.Url(u.Email, 0), http.StatusFound) //nolint:gosec // URL is not constructed from user inputreturn nil, nil}diff --git a/server/subsonic/middlewares.go b/server/subsonic/middlewares.goindex 2d8b1fd94..5832bb1de 100644--- a/server/subsonic/middlewares.go+++ b/server/subsonic/middlewares.go@@ -199,7 +199,7 @@ func getPlayer(players core.Players) func(next http.Handler) http.Handler {}r = r.WithContext(ctx)- cookie := &http.Cookie{+ cookie := &http.Cookie{ //nolint:gosec // Secure omitted: Navidrome may run over plain HTTPName: playerIDCookieName(userName),Value: player.ID,MaxAge: consts.CookieExpiry,@@ -239,7 +239,9 @@ func playerIDCookieName(userName string) string {return cookieName}-const subsonicErrorPointer = "subsonicErrorPointer"+type contextKey string++const subsonicErrorPointer contextKey = "subsonicErrorPointer"func recordStats(metrics metrics.Metrics) func(next http.Handler) http.Handler {return func(next http.Handler) http.Handler {