go-graphite / carbonapi

Found non-idiomatic returning of boolean expression SCC-S1008
Anti-pattern
Major
6 months ago4 years old
should use 'return len(w.Data) != w.nans' instead of 'if len(w.Data) == w.nans { return false }; return true'
179// IsNonNull checks if the window's data contains only NaN values
180// This is to prevent returning -Inf when the window's data contains only NaN values
181func (w *Windowed) IsNonNull() bool {
182	if len(w.Data) == w.nans {183		return false
184	}
185	return true