2
2
-------------------------------------------------------------------------------
3
3
http://www.gmetrics.org
5
Changes in version 0.5 (Jan 2012)
6
--------------------------------------
8
- New CoberturaBranchCoverageMetric. Branch coverage at method/class/package level. Requires a Cobertura "coverage.xml" file. (#3474462)
9
- New CoberturaLineCoverageMetric. Line coverage at method/class/package level. Requires a Cobertura "coverage.xml" file. (#3474462)
10
- New CrapMetric. Calculated the CRAP score for a method, based on its complexity and code coverage. Requires a Cobertura "coverage.xml" file. (#3192158.)
13
- MetricSet DSL: Return value from each metric in the metric set; Allow storing metric in variable. #3465486.
14
This is useful for composite Metrics that require other metric values to calculate results (e.g. CrapMetric). If a metric is
15
defined within another metric definition (assigned to a field), do not include as a standalone metric in the metric set.
17
INTEGRATION WITH OTHER TOOLS
18
- If you use GMetric with CodeNarc, this release requires CodeNarc 0.16.
20
FIXES AND ENHANCEMENTS
21
- Method-level Metrics: Handle multiple overloaded methods. (#3439103). Use MethodKey class.
22
- Fix: For SingleSeries package-level reports, show the full package name, not just the rightmost part of the package name. (#3439104).
23
- Add includeClosureFields property to AbstractMethodMetric. Defaults to true.
24
- Add String getSignature() method to MethodResultsNode and MethodKey. Add signature attribute to Method elements in XmlReportWriter. #3444707.
26
FRAMEWORK/API CHANGES (Potential breaking changes if you have implemented your own Metrics)
27
- Change Metric and AbstractMetric to add packageName to applyToPackage(): applyToPackage(String packageName, Collection<MetricResult> childMetricResults). (Breaking Change). (#3465484)
28
- Introduce new MethodMetric (extends Metric) interface: applyToMethod() and applyToClosure().
29
- Create MethodKey class, with MethodKey(MethodNode) and MethodKey(String) constructors and String getMethodName() method, along with equals() and hashCode().
30
- Introduce Formatter framework. Enable configuring Formatter for Metric within "gmetrics-base-messages.properties".
31
- Reorganize MetricResult implementation classes; rename NumberMetricResult to SingleNumberMetricResult; Create new
32
NumberMetricResult: allows setting values for total, average, min, max.
33
- AggregateNumberMetricResult: Add support for predefinedValues.
34
- Change writeReport(Writer writer, ResultsNode resultsNode, AnalysisContext analysisContext) to protected
37
Changes in version 0.4 (Oct 2011)
38
--------------------------------------
40
- Upgrade to Groovy 1.7. NOTE: GMetrics now requires Groovy 1.7. (#3421010)
41
- Support specifying metrics within the MetricSet by specifying the metric name, with optional properties Map or optional closure. (#3421008)
44
- New FieldCountMetric. Counts the number of fields within each class. (#3341811)
45
- New MethodCountMetric. Counts the number of methods (and closure fields) within each class. (#3341804)
46
- New ClassCountMetric. Counts the number of classes within each package. (#3341812)
48
FIXES AND ENHANCEMENTS
49
- Fix #3305753: Make GMetrics runnable (compatible) with Groovy 1.8.
50
- Fix #3413604: Reimplement ASTUtil.getVariableExpressions() to optimize performance. Thanks to Hamlet D’Arcy.
51
- Fix #3186167: GMetrics can't be built with Groovy >= 1.7.7. Fix illegal writes to final properties.
52
- Fix #3418843: Reports: Exclude results for level "less" than metric base level
53
- ReportWriters: Include output file name in “Report created” message
55
FRAMEWORK/API CHANGES (Potential breaking changes if you have implemented your own Metrics)
56
- #3418135: Add MetricLevel getMetricLevel() to MetricResult interface and impl classes.
57
Also AbstractMetric: Change protected createAggregateMetricResult() to add MetricLevel parameter.
58
- Specify collection types (generics) for method signatures within Metric, MetricResult , ResultsNode and ClassMetricResult classes.
59
- Add isValid() method to the SourceCode interface and implementations.
61
INFRASTRUCTURE AND TESTS
62
- Create GMetricsVersion class with String getVersion(). Remove "GMetrics" from version file.
63
- Upgrade to use CodeNarc 0.15 for tests/analysis.
5
66
Changes in version 0.3 (23 Jul 2010)
6
67
--------------------------------------
45
106
- GMetricsTask: Fix: Replace call to Class.forName() with getClass().classLoader.loadClass().
46
107
- WildcardPattern: Escape plus sign ('+') within patterns. Add plus sign ('+') to convertStringWithWildcardsToRegex().
48
- BasicHtmlReportWriter: Don�t nest packages? Put all packages at the same level (no indent).
49
- BasicHtmlReportWriter: Display full (relative) package names � e.g., �org/gmetrics/source�.
109
- BasicHtmlReportWriter: Don�t nest packages? Put all packages at the same level (no indent).
110
- BasicHtmlReportWriter: Display full (relative) package names � e.g., �org/gmetrics/source�.
50
111
- Enable configuring all reports (AbstractReportWriter) to write to the stdout (console).
51
112
- Add support for 'enabled' property to BasicHtmlReportWriter.