diff --git a/server/server.go b/server/server.go index 1affa873702ef..bafa76c2f8c9e 100644 --- a/server/server.go +++ b/server/server.go @@ -1003,6 +1003,7 @@ func (a *ArgoCDServer) Authenticate(ctx context.Context) (context.Context, error if !argoCDSettings.AnonymousUserEnabled { return ctx, claimsErr } else { + // nolint:staticcheck ctx = context.WithValue(ctx, "claims", "") } } diff --git a/server/server_test.go b/server/server_test.go index f179a11a8c60d..5a869c93486ec 100644 --- a/server/server_test.go +++ b/server/server_test.go @@ -508,7 +508,7 @@ func getTestServer(t *testing.T, anonymousEnabled bool, withFakeSSO bool) (argoc cm.Data["users.anonymous.enabled"] = "true" } ts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { - return // Start with a placeholder. We need the server URL before setting up the real handler. + // Start with a placeholder. We need the server URL before setting up the real handler. })) ts.Config.Handler = http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { dexMockHandler(t, ts.URL)(w, r)