Compile regex outside loop
ProprietaryFind regexp.Compile() or regexp.MustCompile() calls inside for/range loops. Compile the regex once outside the loop for better performance.
org. openrewrite. golang. codequality. CompileRegexOutsideLoopmod run . --recipe= org. openrewrite. golang. codequality. CompileRegexOutsideLoopInstall it once, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.