// MetricSet for testing CrapMetric

final COBERTURA_FILE = 'coverage/GMetrics/coverage.xml'

metricset {

    def coberturaMetric = CoberturaLineCoverage {
        coberturaFile = COBERTURA_FILE
        functions = ['total', 'average']
    }

    CRAP {
        functions = ['total', 'average', 'maximum']
        coverageMetric = coberturaMetric
        complexityMetric = CyclomaticComplexity(functions:['total'])

//      ALTERNATE SYNTAX
//      coverageMetric = metric(org.gmetrics.metric.coverage.CoberturaLineCoverageMetric) {
//            coberturaFile = COBERTURA_FILE
//            functions = ['total']
//      }
    }

}