1
0
mirror of https://github.com/mgechev/revive.git synced 2025-10-30 23:37:49 +02:00

refactor: add all wait group delta at once when possible (#1179)

This commit is contained in:
chavacava
2024-12-08 16:59:52 +01:00
committed by GitHub
parent e23fcdb498
commit f94c9d75db

View File

@@ -102,8 +102,8 @@ func (l *Linter) Lint(packages [][]string, ruleSet []Rule, config Config) (<-cha
}
var wg sync.WaitGroup
wg.Add(len(packages))
for n := range packages {
wg.Add(1)
go func(pkg []string, gover *goversion.Version) {
if err := l.lintPackage(pkg, gover, ruleSet, config, failures); err != nil {
fmt.Fprintln(os.Stderr, err)