sourcegraph/sourcegraph-public-snapshot
insights: refactor capture group methods for readability and performance
Ouverte
#33 148 ouverte le 28 mars 2022
backendcode-insightsgood first issue
Métriques du dépôt
- Stars
- (10 290 étoiles)
- Métriques de merge PR
- (Métriques PR en attente)
Description
When a capture group insight is created, we tally up matches per capture group using MatchValues and Counts methods on ComputeMatchContext. We then group them in the method GroupByCaptureMatch.
The current logic uses many nested for loops. The aim of this ticket is to look into simplifying this logic. What we want at the end is a map of unique capture group values to their count.