diff options
author | Evgeny Mandrikov <mandrikov@gmail.com> | 2012-03-19 09:45:15 +0400 |
---|---|---|
committer | Evgeny Mandrikov <mandrikov@gmail.com> | 2012-03-19 10:31:32 +0400 |
commit | b531cc874dd24859c3e0f5a6951721080734c3f0 (patch) | |
tree | 86126e385a1debe8f74fb185bd8d3660610f6c0f /sonar-plugin-api | |
parent | 2b75a64a9cc33875ec2ebc4384469e9b3af50b5d (diff) | |
download | sonarqube-b531cc874dd24859c3e0f5a6951721080734c3f0.tar.gz sonarqube-b531cc874dd24859c3e0f5a6951721080734c3f0.zip |
SONAR-2721 Display number of "projects" in "Size" widget
Thus add new metric - 'projects'.
Diffstat (limited to 'sonar-plugin-api')
-rw-r--r-- | sonar-plugin-api/src/main/java/org/sonar/api/measures/CoreMetrics.java | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/measures/CoreMetrics.java b/sonar-plugin-api/src/main/java/org/sonar/api/measures/CoreMetrics.java index 01356c325e7..47fa9a861f4 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/measures/CoreMetrics.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/measures/CoreMetrics.java @@ -183,6 +183,20 @@ public final class CoreMetrics { .setFormula(new SumChildValuesFormula(false)) .create(); + /** + * @since 2.15 + */ + public static final String PROJECTS_KEY = "projects"; + + /** + * @since 2.15 + */ + public static final Metric PROJECTS = new Metric.Builder(PROJECTS_KEY, "Projects", Metric.ValueType.INT) + .setDescription("Number of projects") + .setDirection(Metric.DIRECTION_WORST) + .setQualitative(false) + .setDomain(DOMAIN_SIZE) + .create(); //-------------------------------------------------------------------------------------------------------------------- // |