Remove the GoCyclo append

as BuildStats already appends
This commit is contained in:
Will Dixon 2018-05-30 09:33:25 -04:00 committed by GitHub
parent b699340d13
commit d3762b88e3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -22,7 +22,7 @@ func (Gocyclo) Desc() string {
func (g Gocyclo) Run(ctx context.Context, lintCtx *Context) ([]result.Issue, error) {
var stats []gocycloAPI.Stat
for _, f := range lintCtx.ASTCache.GetAllValidFiles() {
stats = append(stats, gocycloAPI.BuildStats(f.F, f.Fset, stats)...)
stats = gocycloAPI.BuildStats(f.F, f.Fset, stats)
}
if len(stats) == 0 {
return nil, nil