Skip to content

Commit

Permalink
dsldevkit#22: SCA configuration - unify configuration
Browse files Browse the repository at this point in the history
 - Remove explicit test configuration for pmd and checkstyle
 - Cleanup new PMD in tests
 - Add checkstyle suppressions for Test and TestUtil classes
 - Disable CPD from parent to not check generated source

Issue: dsldevkit#22
  • Loading branch information
[email protected] authored and [email protected] committed Dec 21, 2017
1 parent a91fcb3 commit c134074
Show file tree
Hide file tree
Showing 52 changed files with 145 additions and 633 deletions.
4 changes: 2 additions & 2 deletions com.avaloq.tools.ddk.check.core.test/.project
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
<link>
<name>.checkstyle</name>
<type>1</type>
<locationURI>PARENT-1-PROJECT_LOC/ddk-configuration/.checkstyle-test</locationURI>
<locationURI>PARENT-1-PROJECT_LOC/ddk-configuration/.checkstyle</locationURI>
</link>
<link>
<name>.fbprefs</name>
Expand All @@ -63,7 +63,7 @@
<link>
<name>.pmd</name>
<type>1</type>
<locationURI>PARENT-1-PROJECT_LOC/ddk-configuration/.pmd-test</locationURI>
<locationURI>PARENT-1-PROJECT_LOC/ddk-configuration/.pmd</locationURI>
</link>
<link>
<name>.settings/edu.umd.cs.findbugs.plugin.eclipse.prefs</name>
Expand Down
4 changes: 0 additions & 4 deletions com.avaloq.tools.ddk.check.core.test/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,4 @@

<artifactId>com.avaloq.tools.ddk.check.core.test</artifactId>
<packaging>eclipse-test-plugin</packaging>
<properties>
<pmd.ruleset>${pmd.test.ruleset}</pmd.ruleset>
<checkstyle.configLocation>${checkstyle.test.configLocation}</checkstyle.configLocation>
</properties>
</project>
4 changes: 2 additions & 2 deletions com.avaloq.tools.ddk.check.runtime.core.test/.project
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
<link>
<name>.checkstyle</name>
<type>1</type>
<locationURI>PARENT-1-PROJECT_LOC/ddk-configuration/.checkstyle-test</locationURI>
<locationURI>PARENT-1-PROJECT_LOC/ddk-configuration/.checkstyle</locationURI>
</link>
<link>
<name>.fbprefs</name>
Expand All @@ -63,7 +63,7 @@
<link>
<name>.pmd</name>
<type>1</type>
<locationURI>PARENT-1-PROJECT_LOC/ddk-configuration/.pmd-test</locationURI>
<locationURI>PARENT-1-PROJECT_LOC/ddk-configuration/.pmd</locationURI>
</link>
<link>
<name>.settings/edu.umd.cs.findbugs.plugin.eclipse.prefs</name>
Expand Down
4 changes: 0 additions & 4 deletions com.avaloq.tools.ddk.check.runtime.core.test/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,4 @@

<artifactId>com.avaloq.tools.ddk.check.runtime.core.test</artifactId>
<packaging>eclipse-test-plugin</packaging>
<properties>
<pmd.ruleset>${pmd.test.ruleset}</pmd.ruleset>
<checkstyle.configLocation>${checkstyle.test.configLocation}</checkstyle.configLocation>
</properties>
</project>
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ private void mockValidatorsWithChecks() {
@Test
public void testBinding() {
// ASSERT
assertSame(CheckRuleLabelProvider.class, checkRuleLabelProvider.getClass());
assertSame("Binding of label provider incorrect.", CheckRuleLabelProvider.class, checkRuleLabelProvider.getClass());
}

/**
Expand All @@ -143,7 +143,7 @@ public void testSuccess() {
final String label = checkRuleLabelProvider.getLabel(ISSUE_CODE);

// ASSERT
assertEquals(LABEL, label);
assertEquals("Label should be " + LABEL + " but was " + label, LABEL, label);
}

/**
Expand All @@ -157,7 +157,7 @@ public void testWhenIssueCodeNotPresent() {
final String label = checkRuleLabelProvider.getLabel("some.package.SomeCheckCatalogIssueCodes.no.such.issue.code");

// ASSERT
assertNull(label);
assertNull("Label should be null but was " + label, label);
}

/**
Expand All @@ -172,7 +172,7 @@ public void testWithNullID() {
final String label = checkRuleLabelProvider.getLabel(null);

// ASSERT
assertNull(label);
assertNull("Label should be null but was " + label, label);
}

/**
Expand All @@ -187,7 +187,7 @@ public void testWithNoValidators() {
final String label = checkRuleLabelProvider.getLabel(ISSUE_CODE);

// ASSERT
assertNull(label);
assertNull("Label should be null but was " + label, label);
}

/**
Expand All @@ -205,7 +205,7 @@ public void testWithNoChecks() {
final String label = checkRuleLabelProvider.getLabel(ISSUE_CODE);

// ASSERT
assertNull(label);
assertNull("Label should be null but was " + label, label);
}

/**
Expand All @@ -225,7 +225,7 @@ public void testWhenIssueCodeIsNotACheckIssueCode() {
final String label = checkRuleLabelProvider.getLabel(notACheckIssueCode);

// ASSERT
assertNull(label);
assertNull("Label should be null but was " + label, label);
}

/**
Expand All @@ -246,7 +246,7 @@ public void testCaching() {
verify(mockValidator, times(1)).getIssueCodeToLabelMap();
}

assertEquals(label1, label2);
assertEquals(label1 + " not equal to " + label2 + " . Equality expected", label1, label2);
}

/**
Expand Down Expand Up @@ -283,7 +283,7 @@ public void testInvalidatingCache() {
verify(mockValidator, times(2)).getIssueCodeToLabelMap();
}

assertEquals(label1, label2);
assertEquals(label1 + " not equal to " + label2 + " . Equality expected", label1, label2);
}

/**
Expand All @@ -295,7 +295,7 @@ public void testClassIsSingleton() {
final ICheckRuleLabelProvider otherCheckRuleLabelProvider = injector.getInstance(CheckRuleLabelProvider.class);

// ASSERT
assertSame(checkRuleLabelProvider, otherCheckRuleLabelProvider);
assertSame("Only one instance of CheckRuleLabelProvider expected", checkRuleLabelProvider, otherCheckRuleLabelProvider);
}

}
Expand Down
4 changes: 2 additions & 2 deletions com.avaloq.tools.ddk.check.test.runtime.tests/.project
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
<link>
<name>.checkstyle</name>
<type>1</type>
<locationURI>PARENT-1-PROJECT_LOC/ddk-configuration/.checkstyle-test</locationURI>
<locationURI>PARENT-1-PROJECT_LOC/ddk-configuration/.checkstyle</locationURI>
</link>
<link>
<name>.fbprefs</name>
Expand All @@ -63,7 +63,7 @@
<link>
<name>.pmd</name>
<type>1</type>
<locationURI>PARENT-1-PROJECT_LOC/ddk-configuration/.pmd-test</locationURI>
<locationURI>PARENT-1-PROJECT_LOC/ddk-configuration/.pmd</locationURI>
</link>
<link>
<name>.settings/edu.umd.cs.findbugs.plugin.eclipse.prefs</name>
Expand Down
4 changes: 0 additions & 4 deletions com.avaloq.tools.ddk.check.test.runtime.tests/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,4 @@

<artifactId>com.avaloq.tools.ddk.check.test.runtime.tests</artifactId>
<packaging>eclipse-plugin</packaging>
<properties>
<pmd.ruleset>${pmd.test.ruleset}</pmd.ruleset>
<checkstyle.configLocation>${checkstyle.test.configLocation}</checkstyle.configLocation>
</properties>
</project>
4 changes: 2 additions & 2 deletions com.avaloq.tools.ddk.check.test.runtime.ui/.project
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
<link>
<name>.checkstyle</name>
<type>1</type>
<locationURI>PARENT-1-PROJECT_LOC/ddk-configuration/.checkstyle-test</locationURI>
<locationURI>PARENT-1-PROJECT_LOC/ddk-configuration/.checkstyle</locationURI>
</link>
<link>
<name>.fbprefs</name>
Expand All @@ -63,7 +63,7 @@
<link>
<name>.pmd</name>
<type>1</type>
<locationURI>PARENT-1-PROJECT_LOC/ddk-configuration/.pmd-test</locationURI>
<locationURI>PARENT-1-PROJECT_LOC/ddk-configuration/.pmd</locationURI>
</link>
<link>
<name>.settings/edu.umd.cs.findbugs.plugin.eclipse.prefs</name>
Expand Down
4 changes: 0 additions & 4 deletions com.avaloq.tools.ddk.check.test.runtime.ui/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,4 @@

<artifactId>com.avaloq.tools.ddk.check.test.runtime.ui</artifactId>
<packaging>eclipse-plugin</packaging>
<properties>
<pmd.ruleset>${pmd.test.ruleset}</pmd.ruleset>
<checkstyle.configLocation>${checkstyle.test.configLocation}</checkstyle.configLocation>
</properties>
</project>
4 changes: 2 additions & 2 deletions com.avaloq.tools.ddk.check.test.runtime/.project
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
<link>
<name>.checkstyle</name>
<type>1</type>
<locationURI>PARENT-1-PROJECT_LOC/ddk-configuration/.checkstyle-test</locationURI>
<locationURI>PARENT-1-PROJECT_LOC/ddk-configuration/.checkstyle</locationURI>
</link>
<link>
<name>.fbprefs</name>
Expand All @@ -63,7 +63,7 @@
<link>
<name>.pmd</name>
<type>1</type>
<locationURI>PARENT-1-PROJECT_LOC/ddk-configuration/.pmd-test</locationURI>
<locationURI>PARENT-1-PROJECT_LOC/ddk-configuration/.pmd</locationURI>
</link>
<link>
<name>.checkstyle</name>
Expand Down
4 changes: 0 additions & 4 deletions com.avaloq.tools.ddk.check.test.runtime/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,4 @@

<artifactId>com.avaloq.tools.ddk.check.test.runtime</artifactId>
<packaging>eclipse-plugin</packaging>
<properties>
<pmd.ruleset>${pmd.test.ruleset}</pmd.ruleset>
<checkstyle.configLocation>${checkstyle.test.configLocation}</checkstyle.configLocation>
</properties>
</project>
4 changes: 2 additions & 2 deletions com.avaloq.tools.ddk.check.ui.test/.project
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
<link>
<name>.checkstyle</name>
<type>1</type>
<locationURI>PARENT-1-PROJECT_LOC/ddk-configuration/.checkstyle-test</locationURI>
<locationURI>PARENT-1-PROJECT_LOC/ddk-configuration/.checkstyle</locationURI>
</link>
<link>
<name>.fbprefs</name>
Expand All @@ -63,7 +63,7 @@
<link>
<name>.pmd</name>
<type>1</type>
<locationURI>PARENT-1-PROJECT_LOC/ddk-configuration/.pmd-test</locationURI>
<locationURI>PARENT-1-PROJECT_LOC/ddk-configuration/.pmd</locationURI>
</link>
<link>
<name>.settings/edu.umd.cs.findbugs.plugin.eclipse.prefs</name>
Expand Down
4 changes: 0 additions & 4 deletions com.avaloq.tools.ddk.check.ui.test/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,4 @@

<artifactId>com.avaloq.tools.ddk.check.ui.test</artifactId>
<packaging>eclipse-test-plugin</packaging>
<properties>
<pmd.ruleset>${pmd.test.ruleset}</pmd.ruleset>
<checkstyle.configLocation>${checkstyle.test.configLocation}</checkstyle.configLocation>
</properties>
</project>
4 changes: 2 additions & 2 deletions com.avaloq.tools.ddk.checkcfg.core.test/.project
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
<link>
<name>.checkstyle</name>
<type>1</type>
<locationURI>PARENT-1-PROJECT_LOC/ddk-configuration/.checkstyle-test</locationURI>
<locationURI>PARENT-1-PROJECT_LOC/ddk-configuration/.checkstyle</locationURI>
</link>
<link>
<name>.fbprefs</name>
Expand All @@ -63,7 +63,7 @@
<link>
<name>.pmd</name>
<type>1</type>
<locationURI>PARENT-1-PROJECT_LOC/ddk-configuration/.pmd-test</locationURI>
<locationURI>PARENT-1-PROJECT_LOC/ddk-configuration/.pmd</locationURI>
</link>
<link>
<name>.settings/edu.umd.cs.findbugs.plugin.eclipse.prefs</name>
Expand Down
4 changes: 0 additions & 4 deletions com.avaloq.tools.ddk.checkcfg.core.test/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,4 @@

<artifactId>com.avaloq.tools.ddk.checkcfg.core.test</artifactId>
<packaging>eclipse-test-plugin</packaging>
<properties>
<pmd.ruleset>${pmd.test.ruleset}</pmd.ruleset>
<checkstyle.configLocation>${checkstyle.test.configLocation}</checkstyle.configLocation>
</properties>
</project>
4 changes: 2 additions & 2 deletions com.avaloq.tools.ddk.checkcfg.ui.test/.project
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
<link>
<name>.checkstyle</name>
<type>1</type>
<locationURI>PARENT-1-PROJECT_LOC/ddk-configuration/.checkstyle-test</locationURI>
<locationURI>PARENT-1-PROJECT_LOC/ddk-configuration/.checkstyle</locationURI>
</link>
<link>
<name>.fbprefs</name>
Expand All @@ -63,7 +63,7 @@
<link>
<name>.pmd</name>
<type>1</type>
<locationURI>PARENT-1-PROJECT_LOC/ddk-configuration/.pmd-test</locationURI>
<locationURI>PARENT-1-PROJECT_LOC/ddk-configuration/.pmd</locationURI>
</link>
<link>
<name>.settings/edu.umd.cs.findbugs.plugin.eclipse.prefs</name>
Expand Down
4 changes: 0 additions & 4 deletions com.avaloq.tools.ddk.checkcfg.ui.test/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,4 @@

<artifactId>com.avaloq.tools.ddk.checkcfg.ui.test</artifactId>
<packaging>eclipse-plugin</packaging>
<properties>
<pmd.ruleset>${pmd.test.ruleset}</pmd.ruleset>
<checkstyle.configLocation>${checkstyle.test.configLocation}</checkstyle.configLocation>
</properties>
</project>
4 changes: 2 additions & 2 deletions com.avaloq.tools.ddk.test.core/.project
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
<link>
<name>.checkstyle</name>
<type>1</type>
<locationURI>PARENT-1-PROJECT_LOC/ddk-configuration/.checkstyle-test</locationURI>
<locationURI>PARENT-1-PROJECT_LOC/ddk-configuration/.checkstyle</locationURI>
</link>
<link>
<name>.fbprefs</name>
Expand All @@ -63,7 +63,7 @@
<link>
<name>.pmd</name>
<type>1</type>
<locationURI>PARENT-1-PROJECT_LOC/ddk-configuration/.pmd-test</locationURI>
<locationURI>PARENT-1-PROJECT_LOC/ddk-configuration/.pmd</locationURI>
</link>
<link>
<name>.settings/edu.umd.cs.findbugs.plugin.eclipse.prefs</name>
Expand Down
4 changes: 0 additions & 4 deletions com.avaloq.tools.ddk.test.core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,4 @@

<artifactId>com.avaloq.tools.ddk.test.core</artifactId>
<packaging>eclipse-plugin</packaging>
<properties>
<pmd.ruleset>${pmd.test.ruleset}</pmd.ruleset>
<checkstyle.configLocation>${checkstyle.test.configLocation}</checkstyle.configLocation>
</properties>
</project>
4 changes: 2 additions & 2 deletions com.avaloq.tools.ddk.test.ui.test/.project
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
<link>
<name>.checkstyle</name>
<type>1</type>
<locationURI>PARENT-1-PROJECT_LOC/ddk-configuration/.checkstyle-test</locationURI>
<locationURI>PARENT-1-PROJECT_LOC/ddk-configuration/.checkstyle</locationURI>
</link>
<link>
<name>.fbprefs</name>
Expand All @@ -63,7 +63,7 @@
<link>
<name>.pmd</name>
<type>1</type>
<locationURI>PARENT-1-PROJECT_LOC/ddk-configuration/.pmd-test</locationURI>
<locationURI>PARENT-1-PROJECT_LOC/ddk-configuration/.pmd</locationURI>
</link>
<link>
<name>.checkstyle</name>
Expand Down
4 changes: 0 additions & 4 deletions com.avaloq.tools.ddk.test.ui.test/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,4 @@

<artifactId>com.avaloq.tools.ddk.test.ui.test</artifactId>
<packaging>eclipse-test-plugin</packaging>
<properties>
<pmd.ruleset>${pmd.test.ruleset}</pmd.ruleset>
<checkstyle.configLocation>${checkstyle.test.configLocation}</checkstyle.configLocation>
</properties>
</project>
4 changes: 2 additions & 2 deletions com.avaloq.tools.ddk.test.ui/.project
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
<link>
<name>.checkstyle</name>
<type>1</type>
<locationURI>PARENT-1-PROJECT_LOC/ddk-configuration/.checkstyle-test</locationURI>
<locationURI>PARENT-1-PROJECT_LOC/ddk-configuration/.checkstyle</locationURI>
</link>
<link>
<name>.fbprefs</name>
Expand All @@ -63,7 +63,7 @@
<link>
<name>.pmd</name>
<type>1</type>
<locationURI>PARENT-1-PROJECT_LOC/ddk-configuration/.pmd-test</locationURI>
<locationURI>PARENT-1-PROJECT_LOC/ddk-configuration/.pmd</locationURI>
</link>
<link>
<name>.settings/edu.umd.cs.findbugs.plugin.eclipse.prefs</name>
Expand Down
4 changes: 0 additions & 4 deletions com.avaloq.tools.ddk.test.ui/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,4 @@

<artifactId>com.avaloq.tools.ddk.test.ui</artifactId>
<packaging>eclipse-plugin</packaging>
<properties>
<pmd.ruleset>${pmd.test.ruleset}</pmd.ruleset>
<checkstyle.configLocation>${checkstyle.test.configLocation}</checkstyle.configLocation>
</properties>
</project>
Loading

0 comments on commit c134074

Please sign in to comment.