aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sonar-batch/src/main/java/org/sonar/batch/debt/SqaleRatingSettings.java6
-rw-r--r--sonar-batch/src/test/java/org/sonar/batch/debt/SqaleRatingDecoratorTest.java6
-rw-r--r--sonar-batch/src/test/java/org/sonar/batch/debt/SqaleRatingSettingsTest.java6
-rw-r--r--sonar-core/src/main/java/org/sonar/core/config/DebtProperties.java4
-rw-r--r--sonar-plugin-api/src/main/java/org/sonar/api/CoreProperties.java4
5 files changed, 13 insertions, 13 deletions
diff --git a/sonar-batch/src/main/java/org/sonar/batch/debt/SqaleRatingSettings.java b/sonar-batch/src/main/java/org/sonar/batch/debt/SqaleRatingSettings.java
index acba0266e26..47596373f11 100644
--- a/sonar-batch/src/main/java/org/sonar/batch/debt/SqaleRatingSettings.java
+++ b/sonar-batch/src/main/java/org/sonar/batch/debt/SqaleRatingSettings.java
@@ -54,10 +54,10 @@ public class SqaleRatingSettings implements BatchComponent {
if (languageSpecificConfig != null && languageSpecificConfig.getManDays() != null) {
return Long.parseLong(languageSpecificConfig.getManDays());
}
- return Long.parseLong(settings.getString(CoreProperties.MAN_DAYS_BY_SIZE_POINT));
+ return Long.parseLong(settings.getString(CoreProperties.DEVELOPMENT_COST));
} catch (Exception e) {
- throw new IllegalArgumentException("The value of the SQALE property '" + CoreProperties.MAN_DAYS_BY_SIZE_POINT
- + "' is incorrect. Expected long but got '" + settings.getString(CoreProperties.MAN_DAYS_BY_SIZE_POINT) + "'", e);
+ throw new IllegalArgumentException("The value of the SQALE property '" + CoreProperties.DEVELOPMENT_COST
+ + "' is incorrect. Expected long but got '" + settings.getString(CoreProperties.DEVELOPMENT_COST) + "'", e);
}
}
diff --git a/sonar-batch/src/test/java/org/sonar/batch/debt/SqaleRatingDecoratorTest.java b/sonar-batch/src/test/java/org/sonar/batch/debt/SqaleRatingDecoratorTest.java
index 1fe1574bffe..cd3029f6e51 100644
--- a/sonar-batch/src/test/java/org/sonar/batch/debt/SqaleRatingDecoratorTest.java
+++ b/sonar-batch/src/test/java/org/sonar/batch/debt/SqaleRatingDecoratorTest.java
@@ -110,7 +110,7 @@ public class SqaleRatingDecoratorTest {
@Test
public void save_total_rating_c() {
- settings.setProperty(CoreProperties.MAN_DAYS_BY_SIZE_POINT, 2 * ONE_DAY_IN_MINUTES);
+ settings.setProperty(CoreProperties.DEVELOPMENT_COST, 2 * ONE_DAY_IN_MINUTES);
settings.setProperty(CoreProperties.SIZE_METRIC, "ncloc");
settings.setProperty(CoreProperties.RATING_GRID, "1, 10,20,50");
@@ -127,7 +127,7 @@ public class SqaleRatingDecoratorTest {
@Test
public void save_total_rating_a() {
- settings.setProperty(CoreProperties.MAN_DAYS_BY_SIZE_POINT, 2 * ONE_DAY_IN_MINUTES);
+ settings.setProperty(CoreProperties.DEVELOPMENT_COST, 2 * ONE_DAY_IN_MINUTES);
settings.setProperty(CoreProperties.SIZE_METRIC, "ncloc");
settings.setProperty(CoreProperties.RATING_GRID, "1, 10,20,50");
@@ -144,7 +144,7 @@ public class SqaleRatingDecoratorTest {
@Test
public void save_total_rating_e() {
- settings.setProperty(CoreProperties.MAN_DAYS_BY_SIZE_POINT, 2 * ONE_DAY_IN_MINUTES);
+ settings.setProperty(CoreProperties.DEVELOPMENT_COST, 2 * ONE_DAY_IN_MINUTES);
settings.setProperty(CoreProperties.SIZE_METRIC, "ncloc");
settings.setProperty(CoreProperties.RATING_GRID, "1, 10,20,50");
diff --git a/sonar-batch/src/test/java/org/sonar/batch/debt/SqaleRatingSettingsTest.java b/sonar-batch/src/test/java/org/sonar/batch/debt/SqaleRatingSettingsTest.java
index cd784f135fc..8ab9e5c5f66 100644
--- a/sonar-batch/src/test/java/org/sonar/batch/debt/SqaleRatingSettingsTest.java
+++ b/sonar-batch/src/test/java/org/sonar/batch/debt/SqaleRatingSettingsTest.java
@@ -61,7 +61,7 @@ public class SqaleRatingSettingsTest {
@Test
public void load_work_units_for_language() throws Exception {
- settings.setProperty(CoreProperties.MAN_DAYS_BY_SIZE_POINT, "50");
+ settings.setProperty(CoreProperties.DEVELOPMENT_COST, "50");
SqaleRatingSettings configurationLoader = new SqaleRatingSettings(settings);
assertThat(configurationLoader.getWorkUnitsBySizePoint("defaultLanguage")).isEqualTo(50L);
@@ -110,7 +110,7 @@ public class SqaleRatingSettingsTest {
@Test
public void fail_on_invalid_work_unit_value() throws Exception {
throwable.expect(IllegalArgumentException.class);
- settings.setProperty(CoreProperties.MAN_DAYS_BY_SIZE_POINT, "a");
+ settings.setProperty(CoreProperties.DEVELOPMENT_COST, "a");
SqaleRatingSettings configurationLoader = new SqaleRatingSettings(settings);
configurationLoader.getSizeMetric("aLanguage", metrics);
@@ -130,7 +130,7 @@ public class SqaleRatingSettingsTest {
String aLanguage = "aLanguage";
settings.setProperty(CoreProperties.SIZE_METRIC, "complexity");
- settings.setProperty(CoreProperties.MAN_DAYS_BY_SIZE_POINT, "30");
+ settings.setProperty(CoreProperties.DEVELOPMENT_COST, "30");
settings.setProperty(CoreProperties.LANGUAGE_SPECIFIC_PARAMETERS, "0");
settings.setProperty(CoreProperties.LANGUAGE_SPECIFIC_PARAMETERS + "." + "0" + "." + CoreProperties.LANGUAGE_SPECIFIC_PARAMETERS_LANGUAGE_KEY, aLanguage);
settings.setProperty(CoreProperties.LANGUAGE_SPECIFIC_PARAMETERS + "." + "0" + "." + CoreProperties.LANGUAGE_SPECIFIC_PARAMETERS_MAN_DAYS_KEY, "40");
diff --git a/sonar-core/src/main/java/org/sonar/core/config/DebtProperties.java b/sonar-core/src/main/java/org/sonar/core/config/DebtProperties.java
index 8979927ddc7..035cfcb01e7 100644
--- a/sonar-core/src/main/java/org/sonar/core/config/DebtProperties.java
+++ b/sonar-core/src/main/java/org/sonar/core/config/DebtProperties.java
@@ -55,8 +55,8 @@ class DebtProperties {
.deprecatedKey("sizeMetric")
.build(),
- PropertyDefinition.builder(CoreProperties.MAN_DAYS_BY_SIZE_POINT)
- .defaultValue("" + CoreProperties.MAN_DAYS_BY_SIZE_POINT_DEF_VALUE)
+ PropertyDefinition.builder(CoreProperties.DEVELOPMENT_COST)
+ .defaultValue("" + CoreProperties.DEVELOPMENT_COST_DEF_VALUE)
.name("Development cost")
.description("Cost to develop one unit of code. If the unit is a line of code (LOC), and the cost to develop 1 LOC has been estimated at 30 minutes, " +
"then the value of this property would be 30.")
diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/CoreProperties.java b/sonar-plugin-api/src/main/java/org/sonar/api/CoreProperties.java
index ef86086c8be..aad1de5ea03 100644
--- a/sonar-plugin-api/src/main/java/org/sonar/api/CoreProperties.java
+++ b/sonar-plugin-api/src/main/java/org/sonar/api/CoreProperties.java
@@ -576,12 +576,12 @@ public interface CoreProperties {
/**
* @since 4.5
*/
- String MAN_DAYS_BY_SIZE_POINT = "sonar.technicalDebt.workUnitsBySizePoint";
+ String DEVELOPMENT_COST = "sonar.technicalDebt.developmentCost";
/**
* @since 4.5
*/
- String MAN_DAYS_BY_SIZE_POINT_DEF_VALUE = "30";
+ String DEVELOPMENT_COST_DEF_VALUE = "30";
/**
* @since 4.5