Skip to content

Commit

Permalink
remove unnecesary loop
Browse files Browse the repository at this point in the history
  • Loading branch information
Br3nda committed Jan 3, 2024
1 parent 6cd052f commit 9f84fa6
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions gocover-cobertura.go
Original file line number Diff line number Diff line change
Expand Up @@ -210,9 +210,8 @@ func (v *fileVisitor) Visit(node ast.Node) ast.Visitor {
method := v.method(n)
method.LineRate = method.Lines.HitRate()
class.Methods = append(class.Methods, method)
for _, line := range method.Lines {
class.Lines = append(class.Lines, line)
}
class.Lines = append(class.Lines, method.Lines...)

class.LineRate = class.Lines.HitRate()
}
return v
Expand Down

0 comments on commit 9f84fa6

Please sign in to comment.