fix: CI lint errors after #397 commits

- flutter analyze: Riverpod 3 dropped StateProvider; replaced
  _dismissedVersionsProvider with a small Notifier<Set<String>>
  + NotifierProvider, mutating via an `add(version)` method.
  Public API (shouldShowUpdateBannerProvider, dismissUpdateProvider)
  unchanged.
- golangci errcheck: defer f.Close() now wrapped in func() { _ = f.Close() }();
  os.Setenv calls in test helper switched to t.Setenv (cleaner — auto-restores
  on test cleanup, no manual Unsetenv needed).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-05-10 20:01:43 -04:00
parent e57a53a92e
commit 14d7678624
2 changed files with 5 additions and 5 deletions
+1 -1
View File
@@ -89,7 +89,7 @@ func (h *handlers) handleClientAPK(w http.ResponseWriter, r *http.Request) {
writeErrWithLog(w, h.logger, "client_apk: open", err)
return
}
defer f.Close()
defer func() { _ = f.Close() }()
stat, err := f.Stat()
if err != nil {
+4 -4
View File
@@ -17,13 +17,13 @@ func withClientAPKDir(t *testing.T) string {
t.Helper()
dir := t.TempDir()
prev, hadPrev := os.LookupEnv("MINSTREL_CLIENT_APK_DIR")
os.Setenv("MINSTREL_CLIENT_APK_DIR", dir)
t.Setenv("MINSTREL_CLIENT_APK_DIR", dir)
t.Cleanup(func() {
if hadPrev {
os.Setenv("MINSTREL_CLIENT_APK_DIR", prev)
} else {
os.Unsetenv("MINSTREL_CLIENT_APK_DIR")
t.Setenv("MINSTREL_CLIENT_APK_DIR", prev)
}
// t.Setenv auto-restores the prior empty/unset state at end of
// test, so the !hadPrev branch needs no explicit Unsetenv.
})
return dir
}