cast to double + fix complexity
This commit is contained in:
6
Jenkinsfile
vendored
6
Jenkinsfile
vendored
@@ -91,7 +91,7 @@ int GetCoverageValue_line_rate(String CoverageFilePath) { return GetCoverageValu
|
||||
int GetCoverageValue_branches_valid(String CoverageFilePath) { return GetCoverageValue(CoverageFilePath,"/coverage/@branches-valid") }
|
||||
int GetCoverageValue_branches_covered(String CoverageFilePath) { return GetCoverageValue(CoverageFilePath,"/coverage/@branches-covered") }
|
||||
int GetCoverageValue_branch_rate(String CoverageFilePath) { return GetCoverageValue(CoverageFilePath,"/coverage/@branch-rate") }
|
||||
int GetCoverageValue_branches_complexity(String CoverageFilePath) { return GetCoverageValue(CoverageFilePath,"/coverage/@branches-complexity") }
|
||||
int GetCoverageValue_complexity(String CoverageFilePath) { return GetCoverageValue(CoverageFilePath,"/coverage/@complexity") }
|
||||
|
||||
|
||||
pipeline {
|
||||
@@ -441,11 +441,11 @@ pipeline {
|
||||
println GetCoverageValue_branch_rate(coverage_report_path)
|
||||
println GetCoverageValue_branches_complexity(coverage_report_path)
|
||||
|
||||
full_rate = (GetCoverageValue_line_rate(coverage_report_path) + GetCoverageValue_branch_rate(coverage_report_path)) / 2
|
||||
full_rate = 1.0 * (GetCoverageValue_line_rate(coverage_report_path) + GetCoverageValue_branch_rate(coverage_report_path)) / 2
|
||||
sz_full_rate =Float.toString(full_rate.setScale(2, RoundingMode.HALF_EVEN))
|
||||
badge_coverage.setStatus(sz_full_rate)
|
||||
|
||||
complexity = GetCoverageValue_branches_complexity(coverage_report_path)
|
||||
complexity = 1.0 * GetCoverageValue_complexity(coverage_report_path)
|
||||
sz_complexity =Float.toString(complexity.setScale(2, RoundingMode.HALF_EVEN))
|
||||
badge_complexity.setStatus(sz_complexity)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user