Fix variable shadowing pointed out by linter.

This commit is contained in:
Arseny Balobanov 2020-03-19 01:33:16 +03:00
parent bb0c91683f
commit 8c9f5151b1

View file

@ -29,15 +29,13 @@ type CoverageRequirements struct {
func getCoverageRequirements(rootPackage string) *CoverageRequirements {
files := listTestFiles(rootPackage)
r := &CoverageRequirements{}
for _, f := range files {
r, _ := searchCoverageComment(f)
if r.Enabled {
if r, _ := searchCoverageComment(f); r.Enabled {
return r
}
}
return r
return &CoverageRequirements{}
}
// searchCoverageComment searches for the first occurrence of the comment of the form