GMetrics

Home
Downloads
Change Log

Metrics
Reports

GMetrics

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.

Running and Configuring GMetrics

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.

Requirements

GMetrics requires:

GMetrics (Groovy 3)

GMetrics-Groovy4 (Groovy 4)

Getting GMetrics from the Maven2 Central Repository

For projects built using Maven, GMetrics is now available from the Maven Central Repository.