3 Commits

Author SHA1 Message Date
Head of Product & Engineering
6a853f6566 fix: resolve all golangci-lint v2 failures
Some checks failed
ci/woodpecker/push/woodpecker Pipeline failed
Production fixes:
- cmd/server/main.go: refactor to run() helper to eliminate exitAfterDefer
  (os.Exit in main() no longer bypasses deferred s.Close)
- internal/cast/client.go: use _ = resp.Body.Close() (errcheck)
- internal/ghl/api.go: wrap both defers as func(){ _ = resp.Body.Close() }()

Test fixes:
- internal/cast/client_test.go: replace err.(*CastAPIError) type assertions
  with errors.As (errorlint)

Config:
- .golangci.yml: use explicit path regex .*_test\\.go and add errorlint
  to test-file exclusions

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-04-05 21:52:36 +02:00
Head of Product & Engineering
8f2080203d fix: update .golangci.yml to v2 config format
Some checks failed
ci/woodpecker/push/woodpecker Pipeline failed
golangci-lint v2 requires version: "2" at the top level, linters.settings
(not linters-settings), and issues.exclusions.rules (not issues.exclude-rules).
Also removed gosimple and unused which are now merged into staticcheck.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-04-05 21:39:28 +02:00
Head of Product & Engineering
675f765cc0 fix: resolve golangci-lint failures and .gitignore scope issue
Some checks failed
ci/woodpecker/push/woodpecker Pipeline failed
- cmd/server/main.go: acknowledge w.Write return value (errcheck)
- internal/store/mongo.go: use errors.Is for ErrNoDocuments (errorlint)
- .golangci.yml: add linter config scoped to relevant linters
- .gitignore: scope /server to root only (was blocking cmd/server/ directory)

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-04-05 21:22:03 +02:00