.multiValues(true)
.category(CoreProperties.CATEGORY_EXCLUSIONS)
.subCategory(CoreProperties.SUBCATEGORY_FILES_EXCLUSIONS)
- .defaultValue(CoreProperties.GLOBAL_TEST_EXCLUSIONS_DEFAULT)
.index(1)
.build(),
PropertyDefinition.builder(CoreProperties.PROJECT_EXCLUSIONS_PROPERTY)
String PROJECT_TEST_EXCLUSIONS_PROPERTY = "sonar.test.exclusions";
String GLOBAL_EXCLUSIONS_PROPERTY = "sonar.global.exclusions";
String GLOBAL_TEST_EXCLUSIONS_PROPERTY = "sonar.global.test.exclusions";
- String GLOBAL_TEST_EXCLUSIONS_DEFAULT = "**/package-info.java";
+ /**
+ * @deprecated since 4.2. See http://jira.codehaus.org/browse/SONAR-5058
+ */
+ String GLOBAL_TEST_EXCLUSIONS_DEFAULT = "";
/**
* @deprecated since 2.5. See discussion from http://jira.codehaus.org/browse/SONAR-1873
*/
@Deprecated
public String[] getTestExclusionPatterns() {
- String[] globalTestExclusions = configuration.getStringArray(CoreProperties.GLOBAL_TEST_EXCLUSIONS_PROPERTY);
- if (globalTestExclusions.length == 0) {
- globalTestExclusions = new String[] {CoreProperties.GLOBAL_TEST_EXCLUSIONS_DEFAULT};
- }
-
return trimExclusions(ImmutableList.<String>builder()
.add(configuration.getStringArray(CoreProperties.PROJECT_TEST_EXCLUSIONS_PROPERTY))
- .add(globalTestExclusions).build());
+ .add(configuration.getStringArray(CoreProperties.GLOBAL_TEST_EXCLUSIONS_PROPERTY)).build());
}
// http://jira.codehaus.org/browse/SONAR-2261 - exclusion must be trimmed
Project project = new Project("key").setConfiguration(conf);
assertThat(project.getExclusionPatterns()).isEmpty();
- assertThat(project.getTestExclusionPatterns()).containsOnly("**/package-info.java");
+ assertThat(project.getTestExclusionPatterns()).isEmpty();
}
@Test