From 764537e903cef07f68b0a0d97e6b925e19363170 Mon Sep 17 00:00:00 2001 From: Evgeny Mandrikov Date: Wed, 23 May 2012 02:20:55 +0600 Subject: [PATCH] SONAR-3182 Remove properties related to PMD CPD --- .../java/org/sonar/plugins/cpd/CpdPlugin.java | 48 ------------------- .../java/org/sonar/api/CoreProperties.java | 35 ++++++++++++++ 2 files changed, 35 insertions(+), 48 deletions(-) diff --git a/plugins/sonar-cpd-plugin/src/main/java/org/sonar/plugins/cpd/CpdPlugin.java b/plugins/sonar-cpd-plugin/src/main/java/org/sonar/plugins/cpd/CpdPlugin.java index ccbe4936d82..5530aa750f2 100644 --- a/plugins/sonar-cpd-plugin/src/main/java/org/sonar/plugins/cpd/CpdPlugin.java +++ b/plugins/sonar-cpd-plugin/src/main/java/org/sonar/plugins/cpd/CpdPlugin.java @@ -28,20 +28,6 @@ import org.sonar.plugins.cpd.index.IndexFactory; import java.util.List; @Properties({ - @Property( - key = CoreProperties.CPD_ENGINE, - defaultValue = CoreProperties.CPD_ENGINE_DEFAULT_VALUE, - name = "Copy&Paste detection engine", - description = "Sonar embeds its own CPD engine since Sonar 2.11, but it's still possible to use the old PMD CPD engine (value 'pmd')." + - " Some Sonar users might want to keep on working with PMD CPD engine for instance to prevent any impact on measures during an upgrade of Sonar." + - " Moreover this Sonar CPD engine is not supported by all Sonar language plugins and when this support is not available," + - " the PMD CPD engine is automatically selected.", - project = true, - module = true, - global = true, - category = CoreProperties.CATEGORY_DUPLICATIONS, - type = PropertyType.SINGLE_SELECT_LIST, - options = {"sonar", "pmd"}), @Property( key = CoreProperties.CPD_CROSS_RPOJECT, defaultValue = CoreProperties.CPD_CROSS_RPOJECT_DEFAULT_VALUE + "", @@ -53,40 +39,6 @@ import java.util.List; module = true, global = true, category = CoreProperties.CATEGORY_DUPLICATIONS, - type = PropertyType.BOOLEAN), - @Property( - key = CoreProperties.CPD_MINIMUM_TOKENS_PROPERTY, - defaultValue = CoreProperties.CPD_MINIMUM_TOKENS_DEFAULT_VALUE + "", - name = "Minimum tokens", - description = "Deprecated property used only by the PMD CPD engine." + - " The number of duplicate tokens above which a block is considered as a duplication.", - project = true, - module = true, - global = true, - category = CoreProperties.CATEGORY_DUPLICATIONS, - type = PropertyType.INTEGER), - @Property( - key = CoreProperties.CPD_IGNORE_LITERALS_PROPERTY, - defaultValue = CoreProperties.CPD_IGNORE_LITERALS_DEFAULT_VALUE + "", - name = "Ignore literals", - description = "Deprecated property used only by the PMD CPD engine." + - " If true, PMD-CPD ignores literal value differences when evaluating a duplicate block." + - " This means that foo=\"first string\"; and foo=\"second string\"; will be seen as equivalent.", - project = true, - module = true, - global = true, - category = CoreProperties.CATEGORY_DUPLICATIONS, - type = PropertyType.BOOLEAN), - @Property( - key = CoreProperties.CPD_IGNORE_IDENTIFIERS_PROPERTY, - defaultValue = CoreProperties.CPD_IGNORE_IDENTIFIERS_DEFAULT_VALUE + "", - name = "Ignore identifiers", - description = "Deprecated property used only by the PMD CPD engine." + - " Similar to 'Ignore literals' but for identifiers; i.e., variable names, methods names, and so forth.", - project = true, - module = true, - global = true, - category = CoreProperties.CATEGORY_DUPLICATIONS, type = PropertyType.BOOLEAN) }) public final class CpdPlugin extends SonarPlugin { 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 7209d584830..8bae9424b1c 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 @@ -161,23 +161,58 @@ public interface CoreProperties { /* CPD */ String CPD_PLUGIN = "cpd"; + + /** + * @deprecated in 3.1 + */ + @Deprecated String CPD_MINIMUM_TOKENS_PROPERTY = "sonar.cpd.minimumTokens"; + + /** + * @deprecated in 3.1 + */ + @Deprecated int CPD_MINIMUM_TOKENS_DEFAULT_VALUE = 100; + + /** + * @deprecated in 3.1 + */ + @Deprecated String CPD_IGNORE_LITERALS_PROPERTY = "sonar.cpd.ignore_literals"; + + /** + * @deprecated in 3.1 + */ + @Deprecated String CPD_IGNORE_LITERALS_DEFAULT_VALUE = "true"; + + /** + * @deprecated in 3.1 + */ + @Deprecated String CPD_IGNORE_IDENTIFIERS_PROPERTY = "sonar.cpd.ignore_identifiers"; + + /** + * @deprecated in 3.1 + */ + @Deprecated String CPD_IGNORE_IDENTIFIERS_DEFAULT_VALUE = "false"; + String CPD_SKIP_PROPERTY = "sonar.cpd.skip"; /** * @since 2.11 + * @deprecated in 3.1 */ + @Deprecated String CPD_ENGINE = "sonar.cpd.engine"; /** * @see #CPD_ENGINE * @since 2.11 + * @deprecated in 3.1 */ + @Deprecated String CPD_ENGINE_DEFAULT_VALUE = "sonar"; /** -- 2.39.5