mirror of
https://github.com/rcourtman/Pulse.git
synced 2026-07-09 16:00:59 +00:00
golangci-lint run ./... failed on ~190 pre-existing errcheck violations and 5 unformatted files, burying any new regression in noise. Fix all of them: - Test files that hand-rolled mock-mode set/restore (vmware, truenas, and friends) now use the canonical setMockModeForTest/testutil.SetMockMode helper instead of drift copies that ignored SetEnabled errors. - internal/mock and internal/monitoring tests get package-local mustSetEnabled/mustSetMockEnabled/mustSetMonitorMockMode helpers that fail the test on toggle errors. - pkg/auth/sqlite_manager.go, pkg/metrics/store.go, pkg/server/server.go: rollbacks in defers use the explicit-discard idiom, migration renames and rollup commits log failures, the hosted reaper goroutine logs an error exit, shutdown mock-disable logs failures. - Remaining test sites check errors with t.Fatalf/t.Errorf or explicitly discard best-effort calls (restore-chmods, handler-closure unmarshals) per existing repo style. - gofmt: internal/api/maintenance_verification.go, internal/ai/demo.go and three findings test files. Only dupl findings remain (44 pre-existing production-code duplication pairs) — those need real refactors, not mechanical fixes. Full test suites pass for every touched package. |
||
|---|---|---|
| .. | ||
| auth_test.go | ||
| authorizer.go | ||
| authorizer_test.go | ||
| coverage_test.go | ||
| password.go | ||
| permissions.go | ||
| policy_evaluator.go | ||
| policy_evaluator_test.go | ||
| rbac.go | ||
| rbac_global_test.go | ||
| rbac_manager.go | ||
| rbac_manager_test.go | ||
| scopes.go | ||
| sqlite_manager.go | ||
| sqlite_manager_bench_test.go | ||
| sqlite_manager_queryplan_test.go | ||
| sqlite_manager_test.go | ||
| token.go | ||