package org.sonar.batch.cpd;
import com.google.common.collect.ImmutableList;
-import org.sonar.api.CoreProperties;
-import org.sonar.api.PropertyType;
-import org.sonar.api.config.PropertyDefinition;
-import org.sonar.api.resources.Qualifiers;
import org.sonar.batch.cpd.decorators.DuplicationDensityDecorator;
import org.sonar.batch.cpd.decorators.SumDuplicationsDecorator;
import org.sonar.batch.cpd.index.IndexFactory;
public static List all() {
return ImmutableList.of(
- PropertyDefinition.builder(CoreProperties.CPD_CROSS_PROJECT)
- .defaultValue(CoreProperties.CPD_CROSS_RPOJECT_DEFAULT_VALUE + "")
- .name("Cross project duplication detection")
- .description("By default, SonarQube detects duplications at sub-project level. This means that a block "
- + "duplicated on two sub-projects of the same project won't be reported. Setting this parameter to \"true\" "
- + "allows to detect duplicates across sub-projects and more generally across projects. Note that activating "
- + "this property will slightly increase each SonarQube analysis time.")
- .onQualifiers(Qualifiers.PROJECT, Qualifiers.MODULE)
- .category(CoreProperties.CATEGORY_GENERAL)
- .subCategory(CoreProperties.SUBCATEGORY_DUPLICATIONS)
- .type(PropertyType.BOOLEAN)
- .build(),
- PropertyDefinition.builder(CoreProperties.CPD_SKIP_PROPERTY)
- .defaultValue("false")
- .name("Skip")
- .description("Disable detection of duplications")
- .hidden()
- .category(CoreProperties.CATEGORY_GENERAL)
- .subCategory(CoreProperties.SUBCATEGORY_DUPLICATIONS)
- .type(PropertyType.BOOLEAN)
- .build(),
- PropertyDefinition.builder(CoreProperties.CPD_EXCLUSIONS)
- .defaultValue("")
- .name("Duplication Exclusions")
- .description("Patterns used to exclude some source files from the duplication detection mechanism. " +
- "See below to know how to use wildcards to specify this property.")
- .onQualifiers(Qualifiers.PROJECT, Qualifiers.MODULE)
- .category(CoreProperties.CATEGORY_EXCLUSIONS)
- .subCategory(CoreProperties.SUBCATEGORY_DUPLICATIONS_EXCLUSIONS)
- .multiValues(true)
- .build(),
-
CpdSensor.class,
CpdMappings.class,
SumDuplicationsDecorator.class,
import com.google.common.collect.ImmutableList;
import com.google.common.collect.Lists;
import org.sonar.api.CoreProperties;
+import org.sonar.api.PropertyType;
import org.sonar.api.config.PropertyDefinition;
import org.sonar.api.resources.Qualifiers;
import org.sonar.core.computation.dbcleaner.DataCleanerProperties;
.onlyOnQualifiers(Qualifiers.PROJECT)
.category(CoreProperties.CATEGORY_GENERAL)
.subCategory(CoreProperties.SUBCATEGORY_DIFFERENTIAL_VIEWS)
+ .build(),
+
+ // CPD
+ PropertyDefinition.builder(CoreProperties.CPD_CROSS_PROJECT)
+ .defaultValue(CoreProperties.CPD_CROSS_RPOJECT_DEFAULT_VALUE + "")
+ .name("Cross project duplication detection")
+ .description("By default, SonarQube detects duplications at sub-project level. This means that a block "
+ + "duplicated on two sub-projects of the same project won't be reported. Setting this parameter to \"true\" "
+ + "allows to detect duplicates across sub-projects and more generally across projects. Note that activating "
+ + "this property will slightly increase each SonarQube analysis time.")
+ .onQualifiers(Qualifiers.PROJECT, Qualifiers.MODULE)
+ .category(CoreProperties.CATEGORY_GENERAL)
+ .subCategory(CoreProperties.SUBCATEGORY_DUPLICATIONS)
+ .type(PropertyType.BOOLEAN)
+ .build(),
+ PropertyDefinition.builder(CoreProperties.CPD_SKIP_PROPERTY)
+ .defaultValue("false")
+ .name("Skip")
+ .description("Disable detection of duplications")
+ .hidden()
+ .category(CoreProperties.CATEGORY_GENERAL)
+ .subCategory(CoreProperties.SUBCATEGORY_DUPLICATIONS)
+ .type(PropertyType.BOOLEAN)
+ .build(),
+ PropertyDefinition.builder(CoreProperties.CPD_EXCLUSIONS)
+ .defaultValue("")
+ .name("Duplication Exclusions")
+ .description("Patterns used to exclude some source files from the duplication detection mechanism. " +
+ "See below to know how to use wildcards to specify this property.")
+ .onQualifiers(Qualifiers.PROJECT, Qualifiers.MODULE)
+ .category(CoreProperties.CATEGORY_EXCLUSIONS)
+ .subCategory(CoreProperties.SUBCATEGORY_DUPLICATIONS_EXCLUSIONS)
+ .multiValues(true)
.build()
- ));
+ ));
return defs;
}
}