Skip to content

Commit

Permalink
fix(cobertura): removes rounding
Browse files Browse the repository at this point in the history
The rounding was previously removed one the package level. This commit also removes it for the sources level.
  • Loading branch information
kuhnroyal authored and VannaDii committed May 6, 2024
1 parent 9094d43 commit 043be6e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 4 additions & 0 deletions cobertura/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 1.0.5

- Removes rounding for source elements

## 1.0.4

- Removes rounding
Expand Down
4 changes: 2 additions & 2 deletions cobertura/bin/src/cobertura.dart
Original file line number Diff line number Diff line change
Expand Up @@ -178,10 +178,10 @@ void _writeCobertura({
var className = path.basenameWithoutExtension(r.file);

var classLineRate = r.lines.found > 0
? (r.lines.hit / r.lines.found).round()
? r.lines.hit / r.lines.found
: r.lines.found;
var classBranchRate = r.branches.found > 0
? (r.branches.hit / r.branches.found).round()
? r.branches.hit / r.branches.found
: r.branches.found;

builder.element("class", attributes: {
Expand Down

0 comments on commit 043be6e

Please sign in to comment.