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>
26 lines
371 B
YAML
26 lines
371 B
YAML
version: "2"
|
|
|
|
linters:
|
|
enable:
|
|
- errcheck
|
|
- govet
|
|
- staticcheck
|
|
- ineffassign
|
|
- errorlint
|
|
- gocritic
|
|
- revive
|
|
settings:
|
|
revive:
|
|
rules:
|
|
- name: exported
|
|
disabled: true
|
|
|
|
issues:
|
|
exclusions:
|
|
rules:
|
|
- path: ".*_test\\.go"
|
|
linters:
|
|
- errcheck
|
|
- gocritic
|
|
- errorlint
|