Default severity: warning
A lock immediately followed by its matching unlock protects no work and is
commonly a missing defer. Intentional empty critical sections used for
synchronization should be documented and suppressed explicitly.
Bad
mutex.Lock()
mutex.Unlock()Good
mutex.Lock()
defer mutex.Unlock()