fsprojects / FSharpLint

Lint tool for F#
https://fsprojects.github.io/FSharpLint/
MIT License
300 stars 73 forks source link

Don't do new Regex.Match in a loop: rather create a Regex and then match that in your loop #707

Open Thorium opened 3 months ago

Thorium commented 3 months ago

Another idea for new rule:

Don't do new Regex.Match in a loop: rather capture let myRegex = Regex("...") and then loop your myRegex.Match