
html_res.adg.clover-descriptions.js Maven / Gradle / Ivy
Show all versions of clover Show documentation
var CLOUD_LABELS = ["0", "10", "20", "30", "40", "50", "60", "70", "80", "90", "100"];
var CLOUD_MIN_MAX_LABELS = ["Min", "", "", "", "", "", "", "", "", "Max"];
var CLOUD_MIN_MAX_LABEL_CLASSES = ["cloud-report-min-label", "", "", "", "", "", "", "", "", "cloud-report-max-label"];
function cloudDescriptionTable(labels, labelClasses) {
var table = '' +
'' +
'' +
' ' +
' ' +
' ' +
' ' +
' ' +
' ' +
' ' +
' ' +
' ' +
' ' +
' ';
if (labelClasses) {
labels.forEach(function (element, index) {
table += "" + element + " ";
});
} else {
labels.forEach(function (element, index) {
table += "" + element + " ";
});
}
table += '
';
return table;
}
function topRisksDescription() {
var description = "The Top Risks tag cloud highlights those classes that are the most complex, yet are" +
"the least covered by your tests. The larger and redder the class, the greater" +
"the risk that class poses for your project or package.
" +
"Font size represents" +
"the Average Method Complexity metric, while the colour represents the Total" +
"Coverage metric as follows:
";
return description + cloudDescriptionTable(CLOUD_LABELS);
}
function quickWinsDescription() {
var description = "The Quick Wins tag cloud highlights the \"low hanging coverage fruit\" of your project" +
"or package. You will achieve the greatest increase in overall code coverage by" +
"covering the largest, reddest classes first. Big red classes contain the highest" +
"number of untested elements.
" +
"Font size represents the Number of Elements metric," +
"while the colour represents the Number of Tested Elements as follows:" +
"
";
return description + cloudDescriptionTable(CLOUD_MIN_MAX_LABELS, CLOUD_MIN_MAX_LABEL_CLASSES);
}
function treeMapDescription() {
var description = "The coverage treemap report allows simultaneous comparison of classes and package by" +
"complexity and by code coverage. This is useful for spotting untested clusters of code." +
"The treemap is divided by package (labelled) and" +
"then further divided by class (unlabelled). The size of the package or class" +
"indicates its complexity (larger squares indicate great complexity, while smaller" +
"squares indicate less complexity).
" +
"Colours indicate the level of coverage, as follows:
";
return description + cloudDescriptionTable(CLOUD_LABELS);
}