summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--plugins/sonar-cpd-plugin/src/main/java/org/sonar/plugins/cpd/CpdSensor.java8
-rw-r--r--sonar-plugin-api/src/main/java/org/sonar/api/CoreProperties.java5
2 files changed, 13 insertions, 0 deletions
diff --git a/plugins/sonar-cpd-plugin/src/main/java/org/sonar/plugins/cpd/CpdSensor.java b/plugins/sonar-cpd-plugin/src/main/java/org/sonar/plugins/cpd/CpdSensor.java
index dfeabd65635..f4eb6203a04 100644
--- a/plugins/sonar-cpd-plugin/src/main/java/org/sonar/plugins/cpd/CpdSensor.java
+++ b/plugins/sonar-cpd-plugin/src/main/java/org/sonar/plugins/cpd/CpdSensor.java
@@ -72,7 +72,15 @@ public class CpdSensor implements Sensor {
@Override
public void execute(SensorContext context) {
+ if (settings.hasKey(CoreProperties.CPD_SKIP_PROPERTY)) {
+ LOG.warn("\"sonar.cpd.skip\" property is deprecated and will be removed. Please set \"sonar.cpd.exclusions=**\" instead to disable duplication mechanism.");
+ }
+
for (String language : fs.languages()) {
+ if (settings.hasKey("sonar.cpd." + language + ".skip")) {
+ LOG.warn("\"sonar.cpd." + language + ".skip\" property is deprecated and will be removed. Please set \"sonar.cpd.exclusions=**\" instead to disable duplication mechanism.");
+ }
+
if (isSkipped(language)) {
LOG.info("Detection of duplicated code is skipped for {}", language);
continue;
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 956cfd64228..38626a5c126 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
@@ -259,6 +259,11 @@ public interface CoreProperties {
@Deprecated
String CPD_MINIMUM_TOKENS_PROPERTY = "sonar.cpd.minimumTokens";
+ /**
+ * @deprecated in 5.0
+ * @see <a href="https://jira.codehaus.org/browse/SONAR-5339">SONAR-5339</a>
+ */
+ @Deprecated
String CPD_SKIP_PROPERTY = "sonar.cpd.skip";
/**