Skip to content

Commit

Permalink
Merge pull request #10 from Br3nda/fix/unnecesary-loop
Browse files Browse the repository at this point in the history
remove unnecesary loop
  • Loading branch information
boumenot authored Jan 7, 2024
2 parents 8779ad0 + 9f84fa6 commit 9c6abb2
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 9c6abb2

Please sign in to comment.