Avoid lock in loop

Proprietary

Find Lock() or RLock() calls inside for/range loops. Acquiring locks in tight loops can cause contention; consider locking once outside the loop.

org.openrewrite.golang.codequality.AvoidLockInLoop
mod run . --recipe=org.openrewrite.golang.codequality.AvoidLockInLoop

Install it once, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.