chore(lint): suppress contextcheck on OIDC provider init call sites

Adding a context parameter to the shared package put its call chains in
contextcheck's scope; the flagged background context in the provider
setup is deliberate since provider lifetime exceeds any request.
This commit is contained in:
kolaente 2026-06-12 10:43:38 +02:00
parent 7da3607032
commit 344bd80f89
2 changed files with 2 additions and 2 deletions

View File

@ -127,7 +127,7 @@ func adminUsersCreate(_ context.Context, in *struct{ Body models.CreateUserBody
if err != nil {
return nil, translateDomainError(err)
}
return &adminUserBody{Body: shared.NewAdminUser(newUser, providers)}, nil
return &adminUserBody{Body: shared.NewAdminUser(newUser, providers)}, nil //nolint:contextcheck // OIDC provider init deliberately uses a background context — provider lifetime exceeds the request
}
func adminUsersPatchAdmin(_ context.Context, in *struct {

View File

@ -47,5 +47,5 @@ func RegisterInfoRoutes(api huma.API) {
func init() { AddRouteRegistrar(RegisterInfoRoutes) }
func info(_ context.Context, _ *struct{}) (*infoBody, error) {
return &infoBody{Body: shared.BuildInfo()}, nil
return &infoBody{Body: shared.BuildInfo()}, nil //nolint:contextcheck // OIDC provider init deliberately uses a background context — provider lifetime exceeds the request
}