diff --git a/lint/linter.go b/lint/linter.go index 2bd8355b7..b42b397b2 100644 --- a/lint/linter.go +++ b/lint/linter.go @@ -109,7 +109,7 @@ func (l *Linter) Lint(packages [][]string, ruleSet []Rule, config Config) (<-cha fmt.Fprintln(os.Stderr, err) os.Exit(1) } - defer wg.Done() + wg.Done() }(packages[n], perPkgVersions[n]) } diff --git a/lint/package.go b/lint/package.go index 2ab035f16..4a633f35a 100644 --- a/lint/package.go +++ b/lint/package.go @@ -189,7 +189,7 @@ func (p *Package) lint(rules []Rule, config Config, failures chan Failure) { wg.Add(1) go (func(file *File) { file.lint(rules, config, failures) - defer wg.Done() + wg.Done() })(file) } wg.Wait()