GMetrics provides calculation and reporting of size and complexity metrics for Groovy source code.
GMetrics scans Groovy source code and applies a set of metrics. Available metrics include Cyclomatic Complexity, ABC, Line counts, Field/Method/Class counts, and Cobertura Code Coverage. See Metrics.
The results are reported in HTML or XML. See Reports.
You can run GMetrics using the supplied Ant Task.
Define the metrics to calculate by Creating a MetricSet.
The Sonar Groovy Plugin uses GMetrics for its calculation of Cyclomatic Complexity for Groovy source code.
GMetrics requires:
GMetrics (Groovy 3)
GMetrics-Groovy4 (Groovy 4)
For projects built using Maven, GMetrics is now available from the Maven Central Repository.