Skip to content

Commit f39d3e7

Browse files
Use properties to configure plugins
1 parent 4159dc9 commit f39d3e7

File tree

2 files changed

+15
-19
lines changed

2 files changed

+15
-19
lines changed

build-tools/src/main/resources/bordertech/bt-pmd-rules.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
</rule>
1212
<rule ref="category/java/design.xml">
1313
<exclude name="LawOfDemeter"/>
14+
<exclude name="LoosePackageCoupling"/>
1415
</rule>
1516
<rule ref="category/java/documentation.xml">
1617
<exclude name="CommentSize"/>

qa-parent/pom.xml

Lines changed: 14 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,15 @@
3030
<!-- Config file -->
3131
<checkstyle.config.location>bordertech/bt-checkstyle.xml</checkstyle.config.location>
3232
<!-- PMD -->
33+
<pmd.printFailingErrors>true</pmd.printFailingErrors>
3334
<!-- Priority: 1 (High) - 5 (Low) -->
3435
<pmd.failurePriority>2</pmd.failurePriority>
36+
<!-- Print details of check failures to build output -->
37+
<pmd.verbose>true</pmd.verbose>
3538
<!-- Rules file -->
3639
<bt.pmd.rules.file>bordertech/bt-pmd-rules.xml</bt.pmd.rules.file>
40+
<!-- CPD (Default to report only) -->
41+
<cpd.failOnViolation>false</cpd.failOnViolation>
3742

3843
<!-- Spotbugs -->
3944
<!-- Effort -->
@@ -43,13 +48,20 @@
4348
<!-- Rank: Scariest (1-4), Scary (5-9), Troubling (10-14), Of concern (15-20) -->
4449
<spotbugs.maxRank>14</spotbugs.maxRank>
4550

46-
<!-- OWASP -->
51+
<!-- OWASP (Default to Critical) -->
4752
<!-- Check every 12 hours (default is 4) -->
4853
<cveValidForHours>12</cveValidForHours>
4954
<!-- Min cvss score to fail on. Range 0-10 : LOW: 0-3.9, MEDIUM: 4-6.9, HIGH: 7.0-8.9, Critical: 9.0-10.0 (Default is 11 which means it never fails) -->
50-
<failBuildOnCVSS>4</failBuildOnCVSS>
55+
<failBuildOnCVSS>9</failBuildOnCVSS>
5156
<!-- If set, owasp uses the proxy id in maven settings to download its db. -->
5257
<mavenSettingsProxyId />
58+
<!-- Disable retirejs analyzer -->
59+
<retireJsAnalyzerEnabled>false</retireJsAnalyzerEnabled>
60+
<!-- Disable swift analyzer -->
61+
<swiftPackageManagerAnalyzerEnabled>false</swiftPackageManagerAnalyzerEnabled>
62+
<!-- Disbale .net analyzers -->
63+
<nuspecAnalyzerEnabled>false</nuspecAnalyzerEnabled>
64+
<assemblyAnalyzerEnabled>false</assemblyAnalyzerEnabled>
5365

5466
<!-- Versions -->
5567
<bt.junit.version>5.6.0</bt.junit.version>
@@ -130,11 +142,6 @@
130142
<groupId>org.apache.maven.plugins</groupId>
131143
<artifactId>maven-checkstyle-plugin</artifactId>
132144
<version>${bt.checkstyle.plugin.version}</version>
133-
<configuration>
134-
<failsOnError>true</failsOnError>
135-
<linkXRef>false</linkXRef>
136-
<consoleOutput>true</consoleOutput>
137-
</configuration>
138145
<dependencies>
139146
<!-- Latest checkstyle version -->
140147
<dependency>
@@ -169,9 +176,6 @@
169176
<rulesets>
170177
<ruleset>${bt.pmd.rules.file}</ruleset>
171178
</rulesets>
172-
<printFailingErrors>true</printFailingErrors>
173-
<linkXRef>false</linkXRef>
174-
<verbose>true</verbose>
175179
</configuration>
176180
<dependencies>
177181
<!-- Latest pmd version -->
@@ -215,9 +219,6 @@
215219
<execution>
216220
<id>checkCpd</id>
217221
<phase>verify</phase>
218-
<configuration>
219-
<failOnViolation>false</failOnViolation>
220-
</configuration>
221222
<goals>
222223
<goal>cpd-check</goal>
223224
</goals>
@@ -276,12 +277,6 @@
276277
<groupId>org.owasp</groupId>
277278
<artifactId>dependency-check-maven</artifactId>
278279
<version>${bt.owasp.plugin.version}</version>
279-
<configuration>
280-
<retireJsAnalyzerEnabled>false</retireJsAnalyzerEnabled>
281-
<nuspecAnalyzerEnabled>false</nuspecAnalyzerEnabled>
282-
<swiftPackageManagerAnalyzerEnabled>false</swiftPackageManagerAnalyzerEnabled>
283-
<assemblyAnalyzerEnabled>false</assemblyAnalyzerEnabled>
284-
</configuration>
285280
<executions>
286281
<execution>
287282
<id>checkDependencies</id>

0 commit comments

Comments
 (0)