aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJulien HENRY <julien.henry@sonarsource.com>2014-05-27 10:04:39 +0200
committerJulien HENRY <julien.henry@sonarsource.com>2014-05-27 11:06:38 +0200
commit8ce44291981c7f06b53780619e0ffeaf6da2b0ba (patch)
tree49e1a8b97ead84ee9a9ee9279f119aa23f1d0c3a
parent57745b3abb937519b574632fcdd13261b4ffc75a (diff)
downloadsonarqube-8ce44291981c7f06b53780619e0ffeaf6da2b0ba.tar.gz
sonarqube-8ce44291981c7f06b53780619e0ffeaf6da2b0ba.zip
SONAR-5216 Rename new metric profiles -> quality_profiles
-rw-r--r--plugins/sonar-core-plugin/src/main/resources/org/sonar/plugins/core/widgets/description.html.erb10
-rwxr-xr-xquick-build.sh2
-rw-r--r--sonar-batch/src/main/java/org/sonar/batch/rule/QProfileDecorator.java6
-rw-r--r--sonar-batch/src/main/java/org/sonar/batch/rule/QProfileEventsDecorator.java6
-rw-r--r--sonar-batch/src/main/java/org/sonar/batch/rule/QProfileSensor.java2
-rw-r--r--sonar-batch/src/test/java/org/sonar/batch/rule/QProfileDecoratorTest.java24
-rw-r--r--sonar-batch/src/test/java/org/sonar/batch/rule/QProfileEventsDecoratorTest.java38
-rw-r--r--sonar-batch/src/test/java/org/sonar/batch/rule/QProfileSensorTest.java6
-rw-r--r--sonar-plugin-api/src/main/java/org/sonar/api/measures/CoreMetrics.java12
-rw-r--r--sonar-server/src/main/webapp/WEB-INF/app/models/metric.rb2
10 files changed, 54 insertions, 54 deletions
diff --git a/plugins/sonar-core-plugin/src/main/resources/org/sonar/plugins/core/widgets/description.html.erb b/plugins/sonar-core-plugin/src/main/resources/org/sonar/plugins/core/widgets/description.html.erb
index 9128bda988d..8f4b9c7fd57 100644
--- a/plugins/sonar-core-plugin/src/main/resources/org/sonar/plugins/core/widgets/description.html.erb
+++ b/plugins/sonar-core-plugin/src/main/resources/org/sonar/plugins/core/widgets/description.html.erb
@@ -10,13 +10,13 @@
<% end %>
<%
- profiles_measure = measure(Metric::PROFILES)
- if profiles_measure && !profiles_measure.data.blank?
- profiles = JSON.parse profiles_measure.data
+ qprofiles_measure = measure(Metric::QUALITY_PROFILES)
+ if qprofiles_measure && !qprofiles_measure.data.blank?
+ qprofiles = JSON.parse qprofiles_measure.data
%>
<p class="description-widget-description">
<%= message('widget.description.profiles') -%>:
- <% profiles.each_with_index do |profile, i| %>
+ <% qprofiles.each_with_index do |profile, i| %>
<span class="nowrap">
<span id="resource_profile">
<%= link_to profile['name'], {:controller => '/profiles', :action => 'show', :id => profile['id']}, :class => 'widget-link', :id => profile['language'] + '_profile_link' -%>
@@ -25,7 +25,7 @@
(<%= Api::Utils.language_name(profile['language']) -%>,
<%= message('widget.description.profile_version_x', :params => profile['version']) -%>)
</span>
- <% if i < (profiles.size - 1) %>,<% end %>
+ <% if i < (qprofiles.size - 1) %>,<% end %>
</span>
<% end %>
</p>
diff --git a/quick-build.sh b/quick-build.sh
index 99ce9771d2f..fcb2deea9e0 100755
--- a/quick-build.sh
+++ b/quick-build.sh
@@ -38,4 +38,4 @@ echo ''
echo ''
echo ''
-mvn clean install -Dtest=false -DfailIfNoTests=false $*
+mvn clean install -DskipTests $*
diff --git a/sonar-batch/src/main/java/org/sonar/batch/rule/QProfileDecorator.java b/sonar-batch/src/main/java/org/sonar/batch/rule/QProfileDecorator.java
index b51dcf8a9c0..1bde76fbd45 100644
--- a/sonar-batch/src/main/java/org/sonar/batch/rule/QProfileDecorator.java
+++ b/sonar-batch/src/main/java/org/sonar/batch/rule/QProfileDecorator.java
@@ -36,7 +36,7 @@ public class QProfileDecorator implements Decorator {
@DependedUpon
public Metric provides() {
- return CoreMetrics.PROFILES;
+ return CoreMetrics.QUALITY_PROFILES;
}
public boolean shouldExecuteOnProject(Project project) {
@@ -49,12 +49,12 @@ public class QProfileDecorator implements Decorator {
return;
}
UsedQProfiles profiles = UsedQProfiles.empty();
- for (Measure childProfilesMeasure : context.getChildrenMeasures(CoreMetrics.PROFILES)) {
+ for (Measure childProfilesMeasure : context.getChildrenMeasures(CoreMetrics.QUALITY_PROFILES)) {
UsedQProfiles childProfiles = UsedQProfiles.fromJSON(childProfilesMeasure.getData());
profiles = profiles.merge(childProfiles);
}
- Measure detailsMeasure = new Measure(CoreMetrics.PROFILES, profiles.toJSON());
+ Measure detailsMeasure = new Measure(CoreMetrics.QUALITY_PROFILES, profiles.toJSON());
context.saveMeasure(detailsMeasure);
}
diff --git a/sonar-batch/src/main/java/org/sonar/batch/rule/QProfileEventsDecorator.java b/sonar-batch/src/main/java/org/sonar/batch/rule/QProfileEventsDecorator.java
index 0410ee5501f..ee67fcb31cd 100644
--- a/sonar-batch/src/main/java/org/sonar/batch/rule/QProfileEventsDecorator.java
+++ b/sonar-batch/src/main/java/org/sonar/batch/rule/QProfileEventsDecorator.java
@@ -56,7 +56,7 @@ public class QProfileEventsDecorator implements Decorator {
@DependsUpon
public Metric dependsUpon() {
- return CoreMetrics.PROFILES;
+ return CoreMetrics.QUALITY_PROFILES;
}
public boolean shouldExecuteOnProject(Project project) {
@@ -70,13 +70,13 @@ public class QProfileEventsDecorator implements Decorator {
}
// Load current profiles
- Measure profilesMeasure = context.getMeasure(CoreMetrics.PROFILES);
+ Measure profilesMeasure = context.getMeasure(CoreMetrics.QUALITY_PROFILES);
UsedQProfiles currentProfiles = UsedQProfiles.fromJSON(profilesMeasure.getData());
// Now load previous profiles
UsedQProfiles pastProfiles;
// First try with new metric
- Measure pastProfilesMeasure = getPreviousMeasure(resource, CoreMetrics.PROFILES);
+ Measure pastProfilesMeasure = getPreviousMeasure(resource, CoreMetrics.QUALITY_PROFILES);
if (pastProfilesMeasure != null) {
pastProfiles = UsedQProfiles.fromJSON(pastProfilesMeasure.getData());
} else {
diff --git a/sonar-batch/src/main/java/org/sonar/batch/rule/QProfileSensor.java b/sonar-batch/src/main/java/org/sonar/batch/rule/QProfileSensor.java
index 8f40db77132..0773a3c6472 100644
--- a/sonar-batch/src/main/java/org/sonar/batch/rule/QProfileSensor.java
+++ b/sonar-batch/src/main/java/org/sonar/batch/rule/QProfileSensor.java
@@ -60,7 +60,7 @@ public class QProfileSensor implements Sensor {
}
}
UsedQProfiles used = UsedQProfiles.fromProfiles(profiles);
- Measure detailsMeasure = new Measure(CoreMetrics.PROFILES, used.toJSON());
+ Measure detailsMeasure = new Measure(CoreMetrics.QUALITY_PROFILES, used.toJSON());
context.saveMeasure(detailsMeasure);
// For backward compatibility
diff --git a/sonar-batch/src/test/java/org/sonar/batch/rule/QProfileDecoratorTest.java b/sonar-batch/src/test/java/org/sonar/batch/rule/QProfileDecoratorTest.java
index 30c8023002b..93bd0c1c348 100644
--- a/sonar-batch/src/test/java/org/sonar/batch/rule/QProfileDecoratorTest.java
+++ b/sonar-batch/src/test/java/org/sonar/batch/rule/QProfileDecoratorTest.java
@@ -55,9 +55,9 @@ public class QProfileDecoratorTest {
@Test
public void aggregate() throws Exception {
- Measure measureModuleA = new Measure(CoreMetrics.PROFILES, "[{\"id\":2,\"name\":\"Java Two\",\"version\":20,\"language\":\"java\"}]");
- Measure measureModuleB = new Measure(CoreMetrics.PROFILES, "[{\"id\":3,\"name\":\"Php One\",\"version\":30,\"language\":\"php\"}]");
- when(decoratorContext.getChildrenMeasures(CoreMetrics.PROFILES)).thenReturn(Arrays.asList(measureModuleA, measureModuleB));
+ Measure measureModuleA = new Measure(CoreMetrics.QUALITY_PROFILES, "[{\"id\":2,\"name\":\"Java Two\",\"version\":20,\"language\":\"java\"}]");
+ Measure measureModuleB = new Measure(CoreMetrics.QUALITY_PROFILES, "[{\"id\":3,\"name\":\"Php One\",\"version\":30,\"language\":\"php\"}]");
+ when(decoratorContext.getChildrenMeasures(CoreMetrics.QUALITY_PROFILES)).thenReturn(Arrays.asList(measureModuleA, measureModuleB));
when(project.getScope()).thenReturn(Scopes.PROJECT);
@@ -65,15 +65,15 @@ public class QProfileDecoratorTest {
decorator.decorate(project, decoratorContext);
verify(decoratorContext).saveMeasure(
- argThat(new IsMeasure(CoreMetrics.PROFILES,
+ argThat(new IsMeasure(CoreMetrics.QUALITY_PROFILES,
"[{\"id\":2,\"name\":\"Java Two\",\"version\":20,\"language\":\"java\"},{\"id\":3,\"name\":\"Php One\",\"version\":30,\"language\":\"php\"}]")));
}
@Test
public void aggregate_several_profile_same_language() throws Exception {
- Measure measureModuleA = new Measure(CoreMetrics.PROFILES, "[{\"id\":2,\"name\":\"Java Two\",\"version\":20,\"language\":\"java\"}]");
- Measure measureModuleB = new Measure(CoreMetrics.PROFILES, "[{\"id\":3,\"name\":\"Java Three\",\"version\":30,\"language\":\"java\"}]");
- when(decoratorContext.getChildrenMeasures(CoreMetrics.PROFILES)).thenReturn(Arrays.asList(measureModuleA, measureModuleB));
+ Measure measureModuleA = new Measure(CoreMetrics.QUALITY_PROFILES, "[{\"id\":2,\"name\":\"Java Two\",\"version\":20,\"language\":\"java\"}]");
+ Measure measureModuleB = new Measure(CoreMetrics.QUALITY_PROFILES, "[{\"id\":3,\"name\":\"Java Three\",\"version\":30,\"language\":\"java\"}]");
+ when(decoratorContext.getChildrenMeasures(CoreMetrics.QUALITY_PROFILES)).thenReturn(Arrays.asList(measureModuleA, measureModuleB));
when(project.getScope()).thenReturn(Scopes.PROJECT);
@@ -81,15 +81,15 @@ public class QProfileDecoratorTest {
decorator.decorate(project, decoratorContext);
verify(decoratorContext).saveMeasure(
- argThat(new IsMeasure(CoreMetrics.PROFILES,
+ argThat(new IsMeasure(CoreMetrics.QUALITY_PROFILES,
"[{\"id\":2,\"name\":\"Java Two\",\"version\":20,\"language\":\"java\"},{\"id\":3,\"name\":\"Java Three\",\"version\":30,\"language\":\"java\"}]")));
}
@Test
public void aggregate_several_profile_same_id() throws Exception {
- Measure measureModuleA = new Measure(CoreMetrics.PROFILES, "[{\"id\":2,\"name\":\"Java Two\",\"version\":20,\"language\":\"java\"}]");
- Measure measureModuleB = new Measure(CoreMetrics.PROFILES, "[{\"id\":2,\"name\":\"Java Two\",\"version\":30,\"language\":\"java\"}]");
- when(decoratorContext.getChildrenMeasures(CoreMetrics.PROFILES)).thenReturn(Arrays.asList(measureModuleA, measureModuleB));
+ Measure measureModuleA = new Measure(CoreMetrics.QUALITY_PROFILES, "[{\"id\":2,\"name\":\"Java Two\",\"version\":20,\"language\":\"java\"}]");
+ Measure measureModuleB = new Measure(CoreMetrics.QUALITY_PROFILES, "[{\"id\":2,\"name\":\"Java Two\",\"version\":30,\"language\":\"java\"}]");
+ when(decoratorContext.getChildrenMeasures(CoreMetrics.QUALITY_PROFILES)).thenReturn(Arrays.asList(measureModuleA, measureModuleB));
when(project.getScope()).thenReturn(Scopes.PROJECT);
@@ -97,7 +97,7 @@ public class QProfileDecoratorTest {
decorator.decorate(project, decoratorContext);
verify(decoratorContext).saveMeasure(
- argThat(new IsMeasure(CoreMetrics.PROFILES,
+ argThat(new IsMeasure(CoreMetrics.QUALITY_PROFILES,
"[{\"id\":2,\"name\":\"Java Two\",\"version\":30,\"language\":\"java\"}]")));
}
}
diff --git a/sonar-batch/src/test/java/org/sonar/batch/rule/QProfileEventsDecoratorTest.java b/sonar-batch/src/test/java/org/sonar/batch/rule/QProfileEventsDecoratorTest.java
index 3fe9497050c..ba20e0a1f98 100644
--- a/sonar-batch/src/test/java/org/sonar/batch/rule/QProfileEventsDecoratorTest.java
+++ b/sonar-batch/src/test/java/org/sonar/batch/rule/QProfileEventsDecoratorTest.java
@@ -62,12 +62,12 @@ public class QProfileEventsDecoratorTest {
@Test
public void shouldDoNothingIfNoProfileChange() {
- Measure previousMeasure = new Measure(CoreMetrics.PROFILES, "[{\"id\":2,\"name\":\"Java Two\",\"version\":20,\"language\":\"java\"}]");
- Measure newMeasure = new Measure(CoreMetrics.PROFILES, "[{\"id\":2,\"name\":\"Java Two\",\"version\":20,\"language\":\"java\"}]");
+ Measure previousMeasure = new Measure(CoreMetrics.QUALITY_PROFILES, "[{\"id\":2,\"name\":\"Java Two\",\"version\":20,\"language\":\"java\"}]");
+ Measure newMeasure = new Measure(CoreMetrics.QUALITY_PROFILES, "[{\"id\":2,\"name\":\"Java Two\",\"version\":20,\"language\":\"java\"}]");
when(timeMachine.getMeasures(any(TimeMachineQuery.class)))
.thenReturn(Arrays.asList(previousMeasure));
- when(decoratorContext.getMeasure(CoreMetrics.PROFILES)).thenReturn(newMeasure);
+ when(decoratorContext.getMeasure(CoreMetrics.QUALITY_PROFILES)).thenReturn(newMeasure);
decorator.decorate(project, decoratorContext);
@@ -78,9 +78,9 @@ public class QProfileEventsDecoratorTest {
public void shouldDoNothingIfNoProfileChange_fallbackOldProfileMeasure() {
mockTMWithDeprecatedProfileMeasures(2, "Java Two", 20);
when(qualityProfileDao.selectById(20)).thenReturn(new QualityProfileDto().setLanguage("java"));
- Measure newMeasure = new Measure(CoreMetrics.PROFILES, "[{\"id\":2,\"name\":\"Java Two\",\"version\":20,\"language\":\"java\"}]");
+ Measure newMeasure = new Measure(CoreMetrics.QUALITY_PROFILES, "[{\"id\":2,\"name\":\"Java Two\",\"version\":20,\"language\":\"java\"}]");
- when(decoratorContext.getMeasure(CoreMetrics.PROFILES)).thenReturn(newMeasure);
+ when(decoratorContext.getMeasure(CoreMetrics.QUALITY_PROFILES)).thenReturn(newMeasure);
when(languages.get("java")).thenReturn(Java.INSTANCE);
@@ -91,13 +91,13 @@ public class QProfileEventsDecoratorTest {
@Test
public void shouldCreateEventIfProfileChange() {
- Measure previousMeasure = new Measure(CoreMetrics.PROFILES, "[{\"id\":2,\"name\":\"Java Two\",\"version\":20,\"language\":\"java\"}]");
+ Measure previousMeasure = new Measure(CoreMetrics.QUALITY_PROFILES, "[{\"id\":2,\"name\":\"Java Two\",\"version\":20,\"language\":\"java\"}]");
// Different profile
- Measure newMeasure = new Measure(CoreMetrics.PROFILES, "[{\"id\":3,\"name\":\"Java Other\",\"version\":1,\"language\":\"java\"}]");
+ Measure newMeasure = new Measure(CoreMetrics.QUALITY_PROFILES, "[{\"id\":3,\"name\":\"Java Other\",\"version\":1,\"language\":\"java\"}]");
when(timeMachine.getMeasures(any(TimeMachineQuery.class)))
.thenReturn(Arrays.asList(previousMeasure));
- when(decoratorContext.getMeasure(CoreMetrics.PROFILES)).thenReturn(newMeasure);
+ when(decoratorContext.getMeasure(CoreMetrics.QUALITY_PROFILES)).thenReturn(newMeasure);
when(languages.get("java")).thenReturn(Java.INSTANCE);
@@ -114,9 +114,9 @@ public class QProfileEventsDecoratorTest {
mockTMWithDeprecatedProfileMeasures(2, "Java Two", 20);
when(qualityProfileDao.selectById(20)).thenReturn(new QualityProfileDto().setLanguage("java"));
// Different profile
- Measure newMeasure = new Measure(CoreMetrics.PROFILES, "[{\"id\":3,\"name\":\"Java Other\",\"version\":1,\"language\":\"java\"}]");
+ Measure newMeasure = new Measure(CoreMetrics.QUALITY_PROFILES, "[{\"id\":3,\"name\":\"Java Other\",\"version\":1,\"language\":\"java\"}]");
- when(decoratorContext.getMeasure(CoreMetrics.PROFILES)).thenReturn(newMeasure);
+ when(decoratorContext.getMeasure(CoreMetrics.QUALITY_PROFILES)).thenReturn(newMeasure);
when(languages.get("java")).thenReturn(Java.INSTANCE);
@@ -130,13 +130,13 @@ public class QProfileEventsDecoratorTest {
@Test
public void shouldCreateEventIfProfileVersionChange() {
- Measure previousMeasure = new Measure(CoreMetrics.PROFILES, "[{\"id\":2,\"name\":\"Java Two\",\"version\":20,\"language\":\"java\"}]");
+ Measure previousMeasure = new Measure(CoreMetrics.QUALITY_PROFILES, "[{\"id\":2,\"name\":\"Java Two\",\"version\":20,\"language\":\"java\"}]");
// Same profile, different version
- Measure newMeasure = new Measure(CoreMetrics.PROFILES, "[{\"id\":2,\"name\":\"Java Two\",\"version\":21,\"language\":\"java\"}]");
+ Measure newMeasure = new Measure(CoreMetrics.QUALITY_PROFILES, "[{\"id\":2,\"name\":\"Java Two\",\"version\":21,\"language\":\"java\"}]");
when(timeMachine.getMeasures(any(TimeMachineQuery.class)))
.thenReturn(Arrays.asList(previousMeasure));
- when(decoratorContext.getMeasure(CoreMetrics.PROFILES)).thenReturn(newMeasure);
+ when(decoratorContext.getMeasure(CoreMetrics.QUALITY_PROFILES)).thenReturn(newMeasure);
when(languages.get("java")).thenReturn(Java.INSTANCE);
@@ -153,9 +153,9 @@ public class QProfileEventsDecoratorTest {
mockTMWithDeprecatedProfileMeasures(2, "Java Two", 20);
when(qualityProfileDao.selectById(20)).thenReturn(new QualityProfileDto().setLanguage("java"));
// Same profile, different version
- Measure newMeasure = new Measure(CoreMetrics.PROFILES, "[{\"id\":2,\"name\":\"Java Two\",\"version\":21,\"language\":\"java\"}]");
+ Measure newMeasure = new Measure(CoreMetrics.QUALITY_PROFILES, "[{\"id\":2,\"name\":\"Java Two\",\"version\":21,\"language\":\"java\"}]");
- when(decoratorContext.getMeasure(CoreMetrics.PROFILES)).thenReturn(newMeasure);
+ when(decoratorContext.getMeasure(CoreMetrics.QUALITY_PROFILES)).thenReturn(newMeasure);
when(languages.get("java")).thenReturn(Java.INSTANCE);
@@ -172,9 +172,9 @@ public class QProfileEventsDecoratorTest {
mockTMWithDeprecatedProfileMeasures(2, "Java Two", null);
when(qualityProfileDao.selectById(20)).thenReturn(new QualityProfileDto().setLanguage("java"));
// Same profile, different version
- Measure newMeasure = new Measure(CoreMetrics.PROFILES, "[{\"id\":2,\"name\":\"Java Two\",\"version\":21,\"language\":\"java\"}]");
+ Measure newMeasure = new Measure(CoreMetrics.QUALITY_PROFILES, "[{\"id\":2,\"name\":\"Java Two\",\"version\":21,\"language\":\"java\"}]");
- when(decoratorContext.getMeasure(CoreMetrics.PROFILES)).thenReturn(newMeasure);
+ when(decoratorContext.getMeasure(CoreMetrics.QUALITY_PROFILES)).thenReturn(newMeasure);
when(languages.get("java")).thenReturn(Java.INSTANCE);
@@ -188,9 +188,9 @@ public class QProfileEventsDecoratorTest {
@Test
public void shouldNotCreateEventIfFirstAnalysis() {
- Measure newMeasure = new Measure(CoreMetrics.PROFILES, "[{\"id\":2,\"name\":\"Java Two\",\"version\":21,\"language\":\"java\"}]");
+ Measure newMeasure = new Measure(CoreMetrics.QUALITY_PROFILES, "[{\"id\":2,\"name\":\"Java Two\",\"version\":21,\"language\":\"java\"}]");
- when(decoratorContext.getMeasure(CoreMetrics.PROFILES)).thenReturn(newMeasure);
+ when(decoratorContext.getMeasure(CoreMetrics.QUALITY_PROFILES)).thenReturn(newMeasure);
when(languages.get("java")).thenReturn(Java.INSTANCE);
diff --git a/sonar-batch/src/test/java/org/sonar/batch/rule/QProfileSensorTest.java b/sonar-batch/src/test/java/org/sonar/batch/rule/QProfileSensorTest.java
index ff6c824ca1f..a074f7185df 100644
--- a/sonar-batch/src/test/java/org/sonar/batch/rule/QProfileSensorTest.java
+++ b/sonar-batch/src/test/java/org/sonar/batch/rule/QProfileSensorTest.java
@@ -61,7 +61,7 @@ public class QProfileSensorTest extends AbstractDaoTestCase {
sensor.analyse(project, sensorContext);
// measures are not saved
- verify(sensorContext).saveMeasure(argThat(new IsMeasure(CoreMetrics.PROFILES, "[]")));
+ verify(sensorContext).saveMeasure(argThat(new IsMeasure(CoreMetrics.QUALITY_PROFILES, "[]")));
}
@Test
@@ -98,7 +98,7 @@ public class QProfileSensorTest extends AbstractDaoTestCase {
verify(sensorContext).saveMeasure(argThat(new IsMeasure(CoreMetrics.PROFILE, "Java Two")));
verify(sensorContext).saveMeasure(argThat(new IsMeasure(CoreMetrics.PROFILE_VERSION, 20.0)));
verify(sensorContext).saveMeasure(
- argThat(new IsMeasure(CoreMetrics.PROFILES, "[{\"id\":2,\"name\":\"Java Two\",\"version\":20,\"language\":\"java\"}]")));
+ argThat(new IsMeasure(CoreMetrics.QUALITY_PROFILES, "[{\"id\":2,\"name\":\"Java Two\",\"version\":20,\"language\":\"java\"}]")));
}
@Test
@@ -116,7 +116,7 @@ public class QProfileSensorTest extends AbstractDaoTestCase {
sensor.analyse(project, sensorContext);
verify(sensorContext).saveMeasure(
- argThat(new IsMeasure(CoreMetrics.PROFILES,
+ argThat(new IsMeasure(CoreMetrics.QUALITY_PROFILES,
"[{\"id\":2,\"name\":\"Java Two\",\"version\":20,\"language\":\"java\"},{\"id\":3,\"name\":\"Php One\",\"version\":30,\"language\":\"php\"}]")));
}
}
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 97571eb20ad..025f27fc511 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
@@ -2221,12 +2221,12 @@ public final class CoreMetrics {
.create();
/**
- * @deprecated since 4.4 doesn't support multi-language. See {@link #PROFILES_KEY}
+ * @deprecated since 4.4 doesn't support multi-language. See {@link #QUALITY_PROFILES_KEY}
*/
@Deprecated
public static final String PROFILE_KEY = "profile";
/**
- * @deprecated since 4.4 doesn't support multi-language. See {@link #PROFILES_KEY}
+ * @deprecated since 4.4 doesn't support multi-language. See {@link #QUALITY_PROFILES_KEY}
*/
@Deprecated
public static final Metric PROFILE = new Metric.Builder(PROFILE_KEY, "Profile", Metric.ValueType.DATA)
@@ -2236,13 +2236,13 @@ public final class CoreMetrics {
/**
* @since 2.9
- * @deprecated since 4.4 doesn't support multi-language. See {@link #PROFILES_KEY}
+ * @deprecated since 4.4 doesn't support multi-language. See {@link #QUALITY_PROFILES_KEY}
*/
@Deprecated
public static final String PROFILE_VERSION_KEY = "profile_version";
/**
* @since 2.9
- * @deprecated since 4.4 doesn't support multi-language. See {@link #PROFILES_KEY}
+ * @deprecated since 4.4 doesn't support multi-language. See {@link #QUALITY_PROFILES_KEY}
*/
@Deprecated
public static final Metric PROFILE_VERSION = new Metric.Builder(PROFILE_VERSION_KEY, "Profile version", Metric.ValueType.INT)
@@ -2255,12 +2255,12 @@ public final class CoreMetrics {
/**
* @since 4.4
*/
- public static final String PROFILES_KEY = "profiles";
+ public static final String QUALITY_PROFILES_KEY = "quality_profiles";
/**
* @since 4.4
*/
- public static final Metric PROFILES = new Metric.Builder(PROFILES_KEY, "Profiles", Metric.ValueType.DATA)
+ public static final Metric QUALITY_PROFILES = new Metric.Builder(QUALITY_PROFILES_KEY, "Profiles", Metric.ValueType.DATA)
.setDescription("Details of quality profiles used during analysis")
.setQualitative(false)
.setDomain(DOMAIN_GENERAL)
diff --git a/sonar-server/src/main/webapp/WEB-INF/app/models/metric.rb b/sonar-server/src/main/webapp/WEB-INF/app/models/metric.rb
index d228a5eaf51..7fa97598b4c 100644
--- a/sonar-server/src/main/webapp/WEB-INF/app/models/metric.rb
+++ b/sonar-server/src/main/webapp/WEB-INF/app/models/metric.rb
@@ -378,7 +378,7 @@ class Metric < ActiveRecord::Base
ALERT_STATUS = 'alert_status'
QUALITY_GATE_DETAILS = 'quality_gate_details'
PROFILE='profile'
- PROFILES='profiles'
+ QUALITY_PROFILES='quality_profiles'
private