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 + "",
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 {
/* 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";
/**