mirror of
https://github.com/gesellix/Bose-SoundTouch.git
synced 2026-08-19 09:06:14 +00:00
lint
This commit is contained in:
@@ -46,15 +46,15 @@ func TestNewWebApp(t *testing.T) {
|
||||
app := NewWebApp()
|
||||
|
||||
// Use require-style checks that satisfy static analyzer
|
||||
if app == nil { //nolint:staticcheck // false positive - NewWebApp never returns nil
|
||||
if app == nil {
|
||||
t.Fatal("NewWebApp returned nil")
|
||||
}
|
||||
if app.Devices == nil { //nolint:staticcheck // false positive - t.Fatal above stops execution
|
||||
if app.Devices == nil {
|
||||
t.Fatal("Devices map not initialized")
|
||||
}
|
||||
|
||||
// At this point we know app and app.Devices are not nil
|
||||
if len(app.Devices) != 0 { //nolint:staticcheck // false positive - t.Fatal above stops execution
|
||||
if len(app.Devices) != 0 {
|
||||
t.Errorf("Expected empty devices map, got %d devices", len(app.Devices))
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user