You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
killercup opened this issue
Jan 29, 2016
· 2 comments
· Fixed by #13412
Assignees
Labels
A-lintArea: New lintsE-mediumCall for participation: Medium difficulty level problem and requires some initial experience.L-perfLint: Belongs in the perf lint groupT-middleType: Probably requires verifiying types
The biggest most important thing for regexes is to make sure you aren't compiling them every time you execute a search. I see it a lot in beginner code. Usually sticking them in lazy_static! is sufficient. But I suspect that might also be hard to detect.
The text was updated successfully, but these errors were encountered:
An easy way would be detecting an ExprLoop containing a regex compile which does not use the iterated variable directly.
This could still have false positives, but should be good enough as a starting point.
mcarton
added
E-medium
Call for participation: Medium difficulty level problem and requires some initial experience.
T-middle
Type: Probably requires verifiying types
A-lint
Area: New lints
L-perf
Lint: Belongs in the perf lint group
labels
Jun 12, 2016
A-lintArea: New lintsE-mediumCall for participation: Medium difficulty level problem and requires some initial experience.L-perfLint: Belongs in the perf lint groupT-middleType: Probably requires verifiying types
In #587, @BurntSushi says:
The text was updated successfully, but these errors were encountered: