Skip to content

Commit

Permalink
refactor: add all wait group delta at once when possible (#1179)
Browse files Browse the repository at this point in the history
  • Loading branch information
chavacava authored Dec 8, 2024
1 parent e23fcdb commit f94c9d7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lint/linter.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit f94c9d7

Please # to comment.