fix(quick-13): resolve lint issues in main source files

- Fix errcheck for db.Close() in testhelper.go
- Fix errcheck, nlreturn, wsl, gofumpt issues in genevents/main.go
- Fix gofumpt and wsl issues in library.go
This commit is contained in:
2026-03-05 14:07:50 -05:00
parent 97f256d67f
commit e1a95e65a9
12 changed files with 177 additions and 61 deletions
+16 -7
View File
@@ -72,7 +72,10 @@ func TestConfig_LoadSave_Roundtrip(t *testing.T) {
}
if loaded.Theme.BackgroundShade != theme.BackgroundLight {
t.Errorf("Theme.BackgroundShade = %q, want %q", loaded.Theme.BackgroundShade, theme.BackgroundLight)
t.Errorf(
"Theme.BackgroundShade = %q, want %q",
loaded.Theme.BackgroundShade, theme.BackgroundLight,
)
}
// Verify tracklist.
@@ -86,13 +89,19 @@ func TestConfig_LoadSave_Roundtrip(t *testing.T) {
}
for i, want := range wantColumns {
if loaded.TrackList.Columns[i].ID != want {
t.Errorf("TrackList.Columns[%d].ID = %q, want %q", i, loaded.TrackList.Columns[i].ID, want)
t.Errorf(
"TrackList.Columns[%d].ID = %q, want %q",
i, loaded.TrackList.Columns[i].ID, want,
)
}
}
// Verify favorites.
if loaded.Favorites.IconStyle != favorites.IconStar {
t.Errorf("Favorites.IconStyle = %q, want %q", loaded.Favorites.IconStyle, favorites.IconStar)
t.Errorf(
"Favorites.IconStyle = %q, want %q",
loaded.Favorites.IconStyle, favorites.IconStar,
)
}
if loaded.Favorites.PinDefault != false {
@@ -105,7 +114,10 @@ func TestConfig_LoadSave_Roundtrip(t *testing.T) {
}
if loaded.Library.ScanConcurrency != library.ScanConcurrencySSD {
t.Errorf("Library.ScanConcurrency = %q, want %q", loaded.Library.ScanConcurrency, library.ScanConcurrencySSD)
t.Errorf(
"Library.ScanConcurrency = %q, want %q",
loaded.Library.ScanConcurrency, library.ScanConcurrencySSD,
)
}
// Verify window.
@@ -206,9 +218,6 @@ func TestConfig_ApplyDefaults_NilSubConfigs(t *testing.T) {
if c.Favorites == nil {
t.Error("Favorites should not be nil after applyDefaults")
}
// Library is intentionally left nil by applyDefaults when it
// starts as nil (no library dir configured yet).
}
// containsSubstring is a test helper for checking error messages.