From b5dc5d21c6335d7760f5c32eb5fd255b8ea9776e Mon Sep 17 00:00:00 2001 From: Fabio Bonelli Date: Wed, 11 Nov 2026 16:07:15 +0000 Subject: [PATCH] fix: update wrapcheck exclusions for Fiber v3 --- .golangci.yaml | 2 +- internal/common/errors.go | 1 - internal/handlers/status.go | 1 - internal/handlers/validate.go | 1 - 4 files changed, 1 insertion(+), 4 deletions(-) diff --git a/.golangci.yaml b/.golangci.yaml index e4c9459..8bd090e 100644 --- a/.golangci.yaml +++ b/.golangci.yaml @@ -42,7 +42,7 @@ linters: wrapcheck: ignore-sigs: # Fiber takes care of unwrapping the error - - func (*github.com/gofiber/fiber/v2.Ctx) + - func (github.com/gofiber/fiber/v3.Ctx) # No point in wrapping these - func encoding/json.Marshal(v any) diff --git a/internal/common/errors.go b/internal/common/errors.go index f93997b..0bc9e73 100644 --- a/internal/common/errors.go +++ b/internal/common/errors.go @@ -40,6 +40,5 @@ func CustomErrorHandler(ctx fiber.Ctx, err error) error { ctx.Status(problemJSON.Status) - //nolint:wrapcheck return ctx.JSON(problemJSON, "application/problem+json") } diff --git a/internal/handlers/status.go b/internal/handlers/status.go index 5d3cabb..2a726d0 100644 --- a/internal/handlers/status.go +++ b/internal/handlers/status.go @@ -17,6 +17,5 @@ func NewStatus(version string, commit string) *Status { func (s *Status) GetStatus(ctx fiber.Ctx) error { ctx.Append("Cache-Control", "no-cache") - //nolint:wrapcheck return ctx.Status(fiber.StatusOK).JSON(s) } diff --git a/internal/handlers/validate.go b/internal/handlers/validate.go index 96af4ae..ab93467 100644 --- a/internal/handlers/validate.go +++ b/internal/handlers/validate.go @@ -73,7 +73,6 @@ func (vh *PubliccodeymlValidatorHandler) Query(ctx fiber.Ctx) error { } } - //nolint:wrapcheck return ctx.JSON(fiber.Map{"valid": valid, "results": results, "normalized": normalized}) }