|
|
Message
The GMetrics project provides calculation
and reporting of size and complexity metrics for Groovy source code.
GMetrics provides an Ant Task that scans Groovy source code,
applying a set of metrics, and generates an HTML or XML report of the
results.
GMetrics includes total, average,
minimum and maximum values for four metrics:
- Cyclomatic
Complexity (NEW)
- ABC
Size/Complexity
- Lines per
method
- Lines per
class
Version 0.3
includes:
- A new SingleSeriesHtmlReportWriter. Creates
HTML report for single series (univariate) of metric values. This single series is
specified by a Metric, a level (package, class or method) and a single
function (total, average, minimum, maximum). e.g., metric:"ABC", function:"average", level:"method". It also supports
other options, e.g. greaterThan:"50", lessThan:"100", sort:"descending", maxResults:"20".
So, you
can create reports such as:
- Show the
average cyclomatic complexity for all classes.
- Show the
top 20 classes by number of source lines.
- Show all
methods with an ABC size/complexity score greater than
30.
- For
BasicHtmlReportWriter and XmlReportWriter:
Add support for filtering metric values included within the reports by metric
name, level ("package", "class" and "method") or function ("total", "average",
"minimum" and "maximum"). e.g.,
metrics="CyclomaticComplexity, ABC"
levels="CyclomaticComplexity=class,method;
ABC=method"
functions="ABC=average;
CyclomaticComplexity=total,maximum"
- Fix: CyclomaticComplexityMetric, AbcComplexityMetric, MethodLineCountMetric: Apply to
constructors as well as regular methods.
Take a look at a Sample GMetrics
Report.
Chris
Mair
|