chore(lint): clear pre-existing CI lint debt

Nine golangci-lint failures accumulated across M7 #352, #372, and
6d1709c that were never surfaced because test-go never ran green long
enough to reach the lint step. The first push to land cleanly through
vet (the M7 #363 slice) ran lint and exposed them.

- errcheck: discard the error on defer Close() in collage.go,
  collage_test.go, and server_test.go.
- gofmt -s: re-run on config.go and playlists_test.go.
- goimports: move the stray "time" import from the local-module group
  to stdlib in server_test.go.
- revive unused-parameter: rename ctx to _ on stubScanner.Scan and
  fakeLidarrUnmonitorer.UnmonitorTrack (test stubs); on
  tracks.Service's adminID, add //nolint:revive directive rather than
  renaming because the HTTP handler passes admin.ID (a real authed-user
  UUID) and the existing comment already flags it as reserved for the
  audit-log follow-up.
This commit is contained in:
2026-05-03 18:59:58 -04:00
parent 66f651cf5c
commit a8fd33d4ed
7 changed files with 8 additions and 8 deletions
+3 -3
View File
@@ -10,6 +10,7 @@ import (
"os"
"strings"
"testing"
"time"
"github.com/go-chi/chi/v5"
"github.com/jackc/pgx/v5/pgxpool"
@@ -20,7 +21,6 @@ import (
"git.fabledsword.com/bvandeusen/minstrel/internal/db/dbq"
"git.fabledsword.com/bvandeusen/minstrel/internal/library"
"git.fabledsword.com/bvandeusen/minstrel/internal/subsonic"
"time"
)
func TestHealthz(t *testing.T) {
@@ -58,7 +58,7 @@ func TestHealthz_IncludesMinClientVersion(t *testing.T) {
if err != nil {
t.Fatalf("GET /healthz: %v", err)
}
defer resp.Body.Close()
defer func() { _ = resp.Body.Close() }()
var body map[string]string
if err := json.NewDecoder(resp.Body).Decode(&body); err != nil {
@@ -247,6 +247,6 @@ func TestRouter_AdminSubtreeNotShadowed(t *testing.T) {
// route-presence assertions in this file.
type stubScanner struct{}
func (stubScanner) Scan(ctx context.Context) (library.Stats, error) {
func (stubScanner) Scan(_ context.Context) (library.Stats, error) {
panic("stubScanner.Scan called from server_test")
}