name = "Global test exclusions",
description = "Exclude tests from code analysis. Applies to every project. Cannot be overriden. Changes will be applied during next code analysis.",
multiValues = true,
- category = CoreProperties.CATEGORY_EXCLUSIONS),
+ category = CoreProperties.CATEGORY_EXCLUSIONS,
+ defaultValue = "**/package-info.java"),
@Property(
key = CoreProperties.PROJECT_EXCLUSIONS_PROPERTY,
name = "Exclusions",
* See http://jira.codehaus.org/browse/SONAR-1449
*/
@Test
- public void doNotMatchAjPattern() {
+ public void doNotMatchAPattern() {
JavaFile file = new JavaFile("org.sonar.commons.Foo");
assertFalse(file.matchFilePattern("**/*.aj"));
assertTrue(file.matchFilePattern("**/*.java"));
}
@Test
- public void doNotExcludeTestFiles() {
+ public void should_exclude_test_files() {
JavaFile unitTest = new JavaFile("org.sonar.commons.FooTest", true);
- assertFalse(unitTest.matchFilePattern("**/*"));
+ assertTrue(unitTest.matchFilePattern("**/*"));
}
private File newDir(String dirName) {