diff options
author | Julien Lancelot <julien.lancelot@sonarsource.com> | 2015-10-28 16:06:56 +0100 |
---|---|---|
committer | Julien Lancelot <julien.lancelot@sonarsource.com> | 2015-10-30 11:25:29 +0100 |
commit | 776130ebe8cfb26e84833b6e11efbf97fc35cbcf (patch) | |
tree | 05ae59b623341c416263c101d1348d3fc4eab071 /sonar-core/src | |
parent | a54a036bdef6a80678d9d0f8b1497f41a707ad34 (diff) | |
download | sonarqube-776130ebe8cfb26e84833b6e11efbf97fc35cbcf.tar.gz sonarqube-776130ebe8cfb26e84833b6e11efbf97fc35cbcf.zip |
SONAR-6355 Period 1 is now the leak period
Period 1 is renamed 'Leak Period' and set to 'since previous version'
Period 2 is now set to 'since previous analyis'
Period 3 is now set to 'over 30 days'
Diffstat (limited to 'sonar-core/src')
-rw-r--r-- | sonar-core/src/main/java/org/sonar/core/config/CorePropertyDefinitions.java | 40 |
1 files changed, 27 insertions, 13 deletions
diff --git a/sonar-core/src/main/java/org/sonar/core/config/CorePropertyDefinitions.java b/sonar-core/src/main/java/org/sonar/core/config/CorePropertyDefinitions.java index 89ed9561030..554ca4b07ee 100644 --- a/sonar-core/src/main/java/org/sonar/core/config/CorePropertyDefinitions.java +++ b/sonar-core/src/main/java/org/sonar/core/config/CorePropertyDefinitions.java @@ -30,6 +30,20 @@ import org.sonar.api.resources.Qualifiers; public class CorePropertyDefinitions { + /* Time machine periods */ + public static final String TIMEMACHINE_PERIOD_PREFIX = "sonar.timemachine.period"; + public static final String TIMEMACHINE_MODE_PREVIOUS_ANALYSIS = "previous_analysis"; + public static final String TIMEMACHINE_MODE_DATE = "date"; + public static final String TIMEMACHINE_MODE_VERSION = "version"; + public static final String TIMEMACHINE_MODE_DAYS = "days"; + public static final String TIMEMACHINE_MODE_PREVIOUS_VERSION = "previous_version"; + + private static final String TIMEMACHINE_DEFAULT_PERIOD_1 = TIMEMACHINE_MODE_PREVIOUS_VERSION; + private static final String TIMEMACHINE_DEFAULT_PERIOD_2 = TIMEMACHINE_MODE_PREVIOUS_ANALYSIS; + private static final String TIMEMACHINE_DEFAULT_PERIOD_3 = "30"; + private static final String TIMEMACHINE_DEFAULT_PERIOD_4 = ""; + private static final String TIMEMACHINE_DEFAULT_PERIOD_5 = ""; + private CorePropertyDefinitions() { // only static stuff } @@ -211,8 +225,8 @@ public class CorePropertyDefinitions { .hidden() .build(), - PropertyDefinition.builder(CoreProperties.TIMEMACHINE_PERIOD_PREFIX + 1) - .name("Period 1") + PropertyDefinition.builder(TIMEMACHINE_PERIOD_PREFIX + 1) + .name("Leak Period") .description("Period used to compare measures and track new issues. Values are : <ul class='bullet'><li>Number of days before " + "analysis, for example 5.</li><li>A custom date. Format is yyyy-MM-dd, for example 2010-12-25</li><li>'previous_analysis' to " + "compare to previous analysis</li><li>'previous_version' to compare to the previous version in the project history</li>" + @@ -220,28 +234,28 @@ public class CorePropertyDefinitions { "<p>When specifying a number of days or a date, the snapshot selected for comparison is " + " the first one available inside the corresponding time range. </p>" + "<p>Changing this property only takes effect after subsequent project inspections.<p/>") - .defaultValue(CoreProperties.TIMEMACHINE_DEFAULT_PERIOD_1) + .defaultValue(TIMEMACHINE_DEFAULT_PERIOD_1) .category(CoreProperties.CATEGORY_GENERAL) .subCategory(CoreProperties.SUBCATEGORY_DIFFERENTIAL_VIEWS) .build(), - PropertyDefinition.builder(CoreProperties.TIMEMACHINE_PERIOD_PREFIX + 2) + PropertyDefinition.builder(TIMEMACHINE_PERIOD_PREFIX + 2) .name("Period 2") - .description("See the property 'Period 1'") - .defaultValue(CoreProperties.TIMEMACHINE_DEFAULT_PERIOD_2) + .description("See the property 'Leak Period'") + .defaultValue(TIMEMACHINE_DEFAULT_PERIOD_2) .category(CoreProperties.CATEGORY_GENERAL) .subCategory(CoreProperties.SUBCATEGORY_DIFFERENTIAL_VIEWS) .build(), - PropertyDefinition.builder(CoreProperties.TIMEMACHINE_PERIOD_PREFIX + 3) + PropertyDefinition.builder(TIMEMACHINE_PERIOD_PREFIX + 3) .name("Period 3") - .description("See the property 'Period 1'") - .defaultValue(CoreProperties.TIMEMACHINE_DEFAULT_PERIOD_3) + .description("See the property 'Leak Period'") + .defaultValue(TIMEMACHINE_DEFAULT_PERIOD_3) .category(CoreProperties.CATEGORY_GENERAL) .subCategory(CoreProperties.SUBCATEGORY_DIFFERENTIAL_VIEWS) .build(), - PropertyDefinition.builder(CoreProperties.TIMEMACHINE_PERIOD_PREFIX + 4) + PropertyDefinition.builder(TIMEMACHINE_PERIOD_PREFIX + 4) .name("Period 4") .description("Period used to compare measures and track new issues. This property is specific to the project. Values are : " + "<ul class='bullet'><li>Number of days before analysis, for example 5.</li><li>A custom date. Format is yyyy-MM-dd, " + @@ -249,16 +263,16 @@ public class CorePropertyDefinitions { "<li>'previous_version' to compare to the previous version in the project history</li><li>A version, for example '1.2' or 'BASELINE'</li></ul>" + "<p>When specifying a number of days or a date, the snapshot selected for comparison is the first one available inside the corresponding time range. </p>" + "<p>Changing this property only takes effect after subsequent project inspections.<p/>") - .defaultValue(CoreProperties.TIMEMACHINE_DEFAULT_PERIOD_4) + .defaultValue(TIMEMACHINE_DEFAULT_PERIOD_4) .onlyOnQualifiers(Qualifiers.PROJECT) .category(CoreProperties.CATEGORY_GENERAL) .subCategory(CoreProperties.SUBCATEGORY_DIFFERENTIAL_VIEWS) .build(), - PropertyDefinition.builder(CoreProperties.TIMEMACHINE_PERIOD_PREFIX + 5) + PropertyDefinition.builder(TIMEMACHINE_PERIOD_PREFIX + 5) .name("Period 5") .description("See the property 'Period 4'") - .defaultValue(CoreProperties.TIMEMACHINE_DEFAULT_PERIOD_5) + .defaultValue(TIMEMACHINE_DEFAULT_PERIOD_5) .onlyOnQualifiers(Qualifiers.PROJECT) .category(CoreProperties.CATEGORY_GENERAL) .subCategory(CoreProperties.SUBCATEGORY_DIFFERENTIAL_VIEWS) |