summaryrefslogtreecommitdiffstats
path: root/plugins/sonar-cpd-plugin/src
diff options
context:
space:
mode:
authorEvgeny Mandrikov <mandrikov@gmail.com>2011-09-09 15:57:39 +0400
committerEvgeny Mandrikov <mandrikov@gmail.com>2011-09-09 16:14:45 +0400
commit50cfd2111cdfd2011cb9fe2d557f4c5c5fc30f2c (patch)
tree7d1133deb4f8e16ebd1fd57a7a54452626dd8655 /plugins/sonar-cpd-plugin/src
parentccdb46878a7e0e23b0810d802c47e61fa92032de (diff)
downloadsonarqube-50cfd2111cdfd2011cb9fe2d557f4c5c5fc30f2c.tar.gz
sonarqube-50cfd2111cdfd2011cb9fe2d557f4c5c5fc30f2c.zip
SONAR-1091 Improve descriptions for the 'Duplications' properties
Diffstat (limited to 'plugins/sonar-cpd-plugin/src')
-rw-r--r--plugins/sonar-cpd-plugin/src/main/java/org/sonar/plugins/cpd/CpdPlugin.java30
-rw-r--r--plugins/sonar-cpd-plugin/src/main/java/org/sonar/plugins/cpd/CpdSensor.java2
2 files changed, 20 insertions, 12 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 08c33002753..68032599244 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
@@ -33,8 +33,11 @@ import org.sonar.plugins.cpd.decorators.SumDuplicationsDecorator;
@Property(
key = CoreProperties.CPD_ENGINE,
defaultValue = CoreProperties.CPD_ENGINE_DEFAULT_VALUE,
- name = "Engine",
- description = "Engine for detection of duplications. Possible values: sonar, pmd.",
+ 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,
@@ -42,8 +45,10 @@ import org.sonar.plugins.cpd.decorators.SumDuplicationsDecorator;
@Property(
key = CoreProperties.CPD_CROSS_RPOJECT,
defaultValue = CoreProperties.CPD_CROSS_RPOJECT_DEFAULT_VALUE + "",
- name = "(Sonar) Detection across projects",
- description = "",
+ name = "Cross project duplicaton detection",
+ description = "Sonar supports the detection of cross project duplications." +
+ " Activating this property will slightly increase each Sonar analysis time." +
+ " This mode can't be used along with the PMD CPD engine.",
project = true,
module = true,
global = true,
@@ -51,8 +56,9 @@ import org.sonar.plugins.cpd.decorators.SumDuplicationsDecorator;
@Property(
key = CoreProperties.CPD_MINIMUM_TOKENS_PROPERTY,
defaultValue = CoreProperties.CPD_MINIMUM_TOKENS_DEFAULT_VALUE + "",
- name = "(PMD) Minimum tokens",
- description = "The number of duplicate tokens above which a block is considered as a duplication.",
+ 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,
@@ -60,9 +66,10 @@ import org.sonar.plugins.cpd.decorators.SumDuplicationsDecorator;
@Property(
key = CoreProperties.CPD_IGNORE_LITERALS_PROPERTY,
defaultValue = CoreProperties.CPD_IGNORE_LITERALS_DEFAULT_VALUE + "",
- name = "(PMD) Ignore literals",
- description = "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.",
+ 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,
@@ -70,8 +77,9 @@ import org.sonar.plugins.cpd.decorators.SumDuplicationsDecorator;
@Property(
key = CoreProperties.CPD_IGNORE_IDENTIFIERS_PROPERTY,
defaultValue = CoreProperties.CPD_IGNORE_IDENTIFIERS_DEFAULT_VALUE + "",
- name = "(PMD) Ignore identifiers",
- description = "Similar to 'Ignore literals' but for identifiers; i.e., variable names, methods names, and so forth.",
+ 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,
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 8405e839c27..afc0ec21b71 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
@@ -78,7 +78,7 @@ public class CpdSensor implements Sensor {
public void analyse(Project project, SensorContext context) {
CpdEngine engine = getEngine(project);
- Logs.INFO.info("{} would be used", engine);
+ Logs.INFO.info("{} is used", engine);
engine.analyse(project, context);
}