Skip to content

Commit e5f0c7f

Browse files
Merge pull request #89 from BorderTech/feature/latest-qa
Latest dependencies
2 parents f58fd5d + 84d102d commit e5f0c7f

File tree

5 files changed

+195
-53
lines changed

5 files changed

+195
-53
lines changed

CHANGELOG.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,15 @@
11
# Change log
22

33
## Release in-progress
4+
* Update plugin dependencies in bordertech_parent
5+
* Update plugin dependencies in qa_parent
6+
* Made the following modifications to CheckStyle config file bt-checkstyle.xml:
7+
* Moved tabWidth override to the top level checker element
8+
* Changed tab indention check to no longer allow any violations by removing the maximum property which was set to 10
9+
* Changed JavadocPackage check to warning
10+
* Changed EmptyForIteratorPad check to warning as IntelliJ code formatting does not currently allow for this
11+
* Added a new checkstyle config file bt-checkstyle-format-only.xml for projects that only want to check basic code formatting.
12+
* Modified the jacoco report goal to the test phase and to make sure it runs after surefire, moved the jacoco plugin after the surefire plugin in the pom file which is how maven determines the run order of plugins defined on the same phase #88
413

514
## 1.0.19
615
* Added bt.qa.fail property as a convenience property to allow projects to fail builds or only report QA violations. #84
Lines changed: 126 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,126 @@
1+
<?xml version="1.0"?>
2+
<!DOCTYPE module PUBLIC
3+
"-//Checkstyle//DTD Checkstyle Configuration 1.3//EN"
4+
"https://checkstyle.org/dtds/configuration_1_3.dtd">
5+
6+
<!-- This checkstyle file is setup just for code format rules. It has been extracted from the code style rules from bt-checkstyle. -->
7+
8+
<module name="Checker">
9+
10+
<property name="severity" value="error"/>
11+
12+
<!-- BorderTech: Override for how many spaces a tab takes from 8 to 4 when Checkstyle prints messages. -->
13+
<property name="tabWidth" value="4"/>
14+
15+
<!-- BorderTech: Filter out Checkstyle warnings that have been suppressed with the @SuppressWarnings annotation. -->
16+
<!-- SuppressWarningsFilter and SuppressWarningsHolder have to be used together. -->
17+
<module name="SuppressWarningsFilter"/>
18+
19+
<!-- BorderTech: only check java files
20+
<property name="fileExtensions" value="java, properties, xml"/>
21+
-->
22+
<property name="fileExtensions" value="java"/>
23+
24+
<!-- Excludes all 'module-info.java' files -->
25+
<!-- See https://checkstyle.org/config_filefilters.html -->
26+
<module name="BeforeExecutionExclusionFileFilter">
27+
<property name="fileNamePattern" value="module\-info\.java$"/>
28+
</module>
29+
30+
<!-- https://checkstyle.org/config_filters.html#SuppressionFilter -->
31+
<module name="SuppressionFilter">
32+
<property name="file" value="${org.checkstyle.sun.suppressionfilter.config}"
33+
default="checkstyle-suppressions.xml"/>
34+
<property name="optional" value="true"/>
35+
</module>
36+
37+
<!-- Checks whether files end with a new line. -->
38+
<!-- See https://checkstyle.org/config_misc.html#NewlineAtEndOfFile -->
39+
<module name="NewlineAtEndOfFile"/>
40+
41+
<!-- Checks for Size Violations. -->
42+
<!-- See https://checkstyle.org/config_sizes.html -->
43+
<module name="FileLength">
44+
<!-- BorderTech: Override to warning -->
45+
<property name="severity" value="warning"/>
46+
</module>
47+
<module name="LineLength">
48+
<property name="fileExtensions" value="java"/>
49+
<!-- BorderTech: Override from 80 to 150 -->
50+
<property name="max" value="150"/>
51+
<!-- BorderTech: Override to warning -->
52+
<property name="severity" value="warning"/>
53+
</module>
54+
55+
<!-- BorderTech: Use tabs for indenting -->
56+
<module name="RegexpSingleline">
57+
<property name="format" value="^(\t*( +\t*(?! \*|\S))|( ))"/>
58+
<property name="message" value="Indentation should be tabs."/>
59+
</module>
60+
61+
<!-- Miscellaneous other checks. -->
62+
<!-- See https://checkstyle.org/config_misc.html -->
63+
<module name="RegexpSingleline">
64+
<property name="format" value="\s+$"/>
65+
<property name="minimum" value="0"/>
66+
<property name="maximum" value="0"/>
67+
<property name="message" value="Line has trailing spaces."/>
68+
<!-- BorderTech: Override to warning -->
69+
<property name="severity" value="warning"/>
70+
</module>
71+
72+
<module name="TreeWalker">
73+
74+
<!-- BorderTech: Make the @SuppressWarnings annotations available to Checkstyle -->
75+
<!-- SuppressWarningsFilter and SuppressWarningsHolder have to be used together. -->
76+
<module name="SuppressWarningsHolder"/>
77+
78+
<!-- Checks for imports -->
79+
<!-- See https://checkstyle.org/config_imports.html -->
80+
<module name="AvoidStarImport"/>
81+
<module name="IllegalImport">
82+
<!-- BorderTech: Override to warning as focusing on formatting issues -->
83+
<property name="severity" value="warning"/>
84+
</module><!-- defaults to sun.* packages -->
85+
<module name="RedundantImport"/>
86+
<module name="UnusedImports">
87+
<!-- BorderTech: Check javadoc as well -->
88+
<property name="processJavadoc" value="true"/>
89+
</module>
90+
91+
<!-- Checks for whitespace -->
92+
<!-- See https://checkstyle.org/config_whitespace.html -->
93+
<module name="EmptyForIteratorPad">
94+
<!-- BorderTech: Override to warning as IntelliJ does not currently allow for this-->
95+
<property name="severity" value="warning"/>
96+
</module>
97+
<module name="GenericWhitespace"/>
98+
<module name="MethodParamPad"/>
99+
<module name="NoWhitespaceAfter">
100+
<!-- BorderTech: Tokens to check -->
101+
<property name="tokens" value="BNOT,DEC,DOT,INC,LNOT,UNARY_MINUS,UNARY_PLUS"/>
102+
</module>
103+
<module name="NoWhitespaceBefore"/>
104+
<module name="OperatorWrap"/>
105+
<module name="ParenPad"/>
106+
<module name="TypecastParenPad"/>
107+
<module name="WhitespaceAfter"/>
108+
<module name="WhitespaceAround"/>
109+
110+
<!-- Checks for blocks. You know, those {}'s -->
111+
<!-- See http://checkstyle.sourceforge.net/config_blocks.html -->
112+
<module name="AvoidNestedBlocks">
113+
<!-- BorderTech: Allow a nested block in a switch -->
114+
<property name="allowInSwitchCase" value="true"/>
115+
</module>
116+
<module name="EmptyBlock">
117+
<!-- BorderTech: Override to warning -->
118+
<property name="severity" value="warning"/>
119+
</module>
120+
<module name="LeftCurly"/>
121+
<module name="NeedBraces"/>
122+
<module name="RightCurly"/>
123+
124+
</module>
125+
126+
</module>

build-tools/src/main/resources/bordertech/bt-checkstyle.xml

Lines changed: 35 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"-//Checkstyle//DTD Checkstyle Configuration 1.3//EN"
44
"https://checkstyle.org/dtds/configuration_1_3.dtd">
55

6-
<!-- Based on sun_checks.xml V9.3 (https://github.com/checkstyle/checkstyle/blob/checkstyle-9.3/src/main/resources/sun_checks.xml) -->
6+
<!-- Based on sun_checks.xml V10.7.0 (https://github.com/checkstyle/checkstyle/blob/checkstyle-10.7.0/src/main/resources/sun_checks.xml) -->
77

88
<!--
99
Checkstyle configuration that checks the sun coding conventions from:
@@ -31,9 +31,12 @@ Checkstyle configuration that checks the sun coding conventions from:
3131
-->
3232
<property name="severity" value="error"/>
3333

34+
<!-- BorderTech: Override for how many spaces a tab takes from 8 to 4 when Checkstyle prints messages. -->
35+
<property name="tabWidth" value="4"/>
36+
3437
<!-- BorderTech: Filter out Checkstyle warnings that have been suppressed with the @SuppressWarnings annotation. -->
3538
<!-- SuppressWarningsFilter and SuppressWarningsHolder have to be used together. -->
36-
<module name="SuppressWarningsFilter" />
39+
<module name="SuppressWarningsFilter"/>
3740

3841
<!-- BorderTech: only check java files
3942
<property name="fileExtensions" value="java, properties, xml"/>
@@ -49,13 +52,16 @@ Checkstyle configuration that checks the sun coding conventions from:
4952
<!-- https://checkstyle.org/config_filters.html#SuppressionFilter -->
5053
<module name="SuppressionFilter">
5154
<property name="file" value="${org.checkstyle.sun.suppressionfilter.config}"
52-
default="checkstyle-suppressions.xml" />
55+
default="checkstyle-suppressions.xml"/>
5356
<property name="optional" value="true"/>
5457
</module>
5558

5659
<!-- Checks that a package-info.java file exists for each package. -->
5760
<!-- See https://checkstyle.org/config_javadoc.html#JavadocPackage -->
58-
<module name="JavadocPackage"/>
61+
<module name="JavadocPackage">
62+
<!-- BorderTech: Override to warning -->
63+
<property name="severity" value="warning"/>
64+
</module>
5965

6066
<!-- Checks whether files end with a new line. -->
6167
<!-- See https://checkstyle.org/config_misc.html#NewlineAtEndOfFile -->
@@ -69,14 +75,14 @@ Checkstyle configuration that checks the sun coding conventions from:
6975
<!-- See https://checkstyle.org/config_sizes.html -->
7076
<module name="FileLength">
7177
<!-- BorderTech: Override to warning -->
72-
<property name="severity" value="warning" />
78+
<property name="severity" value="warning"/>
7379
</module>
7480
<module name="LineLength">
7581
<property name="fileExtensions" value="java"/>
7682
<!-- BorderTech: Override from 80 to 150 -->
77-
<property name="max" value="150" />
83+
<property name="max" value="150"/>
7884
<!-- BorderTech: Override to warning -->
79-
<property name="severity" value="warning" />
85+
<property name="severity" value="warning"/>
8086
</module>
8187

8288
<!-- See https://checkstyle.org/config_whitespace.html -->
@@ -88,7 +94,6 @@ Checkstyle configuration that checks the sun coding conventions from:
8894
<module name="RegexpSingleline">
8995
<property name="format" value="^(\t*( +\t*(?! \*|\S))|( ))"/>
9096
<property name="message" value="Indentation should be tabs."/>
91-
<property name="maximum" value="10"/>
9297
</module>
9398

9499
<!-- Miscellaneous other checks. -->
@@ -99,7 +104,7 @@ Checkstyle configuration that checks the sun coding conventions from:
99104
<property name="maximum" value="0"/>
100105
<property name="message" value="Line has trailing spaces."/>
101106
<!-- BorderTech: Override to warning -->
102-
<property name="severity" value="warning" />
107+
<property name="severity" value="warning"/>
103108
</module>
104109

105110
<!-- Checks for Headers -->
@@ -111,18 +116,15 @@ Checkstyle configuration that checks the sun coding conventions from:
111116

112117
<module name="TreeWalker">
113118

114-
<!-- BorderTech: Override for how many spaces a tab takes from 8 to 4 -->
115-
<property name="tabWidth" value="4"/>
116-
117119
<!-- BorderTech: Make the @SuppressWarnings annotations available to Checkstyle -->
118120
<!-- SuppressWarningsFilter and SuppressWarningsHolder have to be used together. -->
119-
<module name="SuppressWarningsHolder" />
121+
<module name="SuppressWarningsHolder"/>
120122

121123
<!-- Checks for Javadoc comments. -->
122124
<!-- See https://checkstyle.org/config_javadoc.html -->
123125
<module name="InvalidJavadocPosition">
124126
<!-- BorderTech: Override to warning -->
125-
<property name="severity" value="warning" />
127+
<property name="severity" value="warning"/>
126128
</module>
127129

128130
<module name="JavadocMethod">
@@ -156,23 +158,26 @@ Checkstyle configuration that checks the sun coding conventions from:
156158
<module name="RedundantImport"/>
157159
<module name="UnusedImports">
158160
<!-- BorderTech: Check javadoc as well -->
159-
<property name="processJavadoc" value="true" />
161+
<property name="processJavadoc" value="true"/>
160162
</module>
161163

162164
<!-- Checks for Size Violations. -->
163165
<!-- See https://checkstyle.org/config_sizes.html -->
164166
<module name="MethodLength">
165167
<!-- BorderTech: Override to warning -->
166-
<property name="severity" value="warning" />
168+
<property name="severity" value="warning"/>
167169
</module>
168170
<module name="ParameterNumber">
169171
<!-- BorderTech: Override to warning -->
170-
<property name="severity" value="warning" />
172+
<property name="severity" value="warning"/>
171173
</module>
172174

173175
<!-- Checks for whitespace -->
174176
<!-- See https://checkstyle.org/config_whitespace.html -->
175-
<module name="EmptyForIteratorPad"/>
177+
<module name="EmptyForIteratorPad">
178+
<!-- BorderTech: Override to warning as IntelliJ does not currently allow for this-->
179+
<property name="severity" value="warning"/>
180+
</module>
176181
<module name="GenericWhitespace"/>
177182
<module name="MethodParamPad"/>
178183
<module name="NoWhitespaceAfter">
@@ -191,7 +196,7 @@ Checkstyle configuration that checks the sun coding conventions from:
191196
<module name="ModifierOrder"/>
192197
<module name="RedundantModifier">
193198
<!-- BorderTech: Override to warning -->
194-
<property name="severity" value="warning" />
199+
<property name="severity" value="warning"/>
195200
</module>
196201

197202
<!-- Checks for blocks. You know, those {}'s -->
@@ -202,7 +207,7 @@ Checkstyle configuration that checks the sun coding conventions from:
202207
</module>
203208
<module name="EmptyBlock">
204209
<!-- BorderTech: Override to warning -->
205-
<property name="severity" value="warning" />
210+
<property name="severity" value="warning"/>
206211
</module>
207212
<module name="LeftCurly"/>
208213
<module name="NeedBraces"/>
@@ -212,30 +217,30 @@ Checkstyle configuration that checks the sun coding conventions from:
212217
<!-- See https://checkstyle.org/config_coding.html -->
213218
<module name="EmptyStatement">
214219
<!-- BorderTech: Override to warning -->
215-
<property name="severity" value="warning" />
220+
<property name="severity" value="warning"/>
216221
</module>
217222
<module name="EqualsHashCode"/>
218223
<module name="HiddenField">
219224
<!-- BorderTech: Override from false for constructor parameters -->
220-
<property name="ignoreConstructorParameter" value = "true" />
225+
<property name="ignoreConstructorParameter" value = "true"/>
221226
<!-- BorderTech: Override from false for setter parameters -->
222-
<property name="ignoreSetter" value = "true" />
227+
<property name="ignoreSetter" value = "true"/>
223228
<!-- BorderTech: Override to warning -->
224-
<property name="severity" value="warning" />
229+
<property name="severity" value="warning"/>
225230
</module>
226231
<module name="IllegalInstantiation"/>
227232
<module name="InnerAssignment"/>
228233
<module name="MagicNumber">
229234
<!-- BorderTech: Override from false for hash code methods -->
230-
<property name="ignoreHashCodeMethod" value = "true" />
235+
<property name="ignoreHashCodeMethod" value = "true"/>
231236
<!-- BorderTech: Override from false for annotation methods -->
232-
<property name="ignoreAnnotation" value = "true" />
237+
<property name="ignoreAnnotation" value = "true"/>
233238
<!-- BorderTech: Override to warning -->
234-
<property name="severity" value="warning" />
239+
<property name="severity" value="warning"/>
235240
</module>
236241
<module name="MissingSwitchDefault">
237242
<!-- BorderTech: Override to warning -->
238-
<property name="severity" value="warning" />
243+
<property name="severity" value="warning"/>
239244
</module>
240245
<module name="MultipleVariableDeclarations"/>
241246
<module name="SimplifyBooleanExpression"/>
@@ -259,14 +264,14 @@ Checkstyle configuration that checks the sun coding conventions from:
259264
<module name="FinalParameters"/>
260265
<module name="TodoComment">
261266
<!-- BorderTech: Override to warning -->
262-
<property name="severity" value="warning" />
267+
<property name="severity" value="warning"/>
263268
</module>
264269
<module name="UpperEll"/>
265270

266271
<!-- https://checkstyle.org/config_filters.html#SuppressionXpathFilter -->
267272
<module name="SuppressionXpathFilter">
268273
<property name="file" value="${org.checkstyle.sun.suppressionxpathfilter.config}"
269-
default="checkstyle-xpath-suppressions.xml" />
274+
default="checkstyle-xpath-suppressions.xml"/>
270275
<property name="optional" value="true"/>
271276
</module>
272277

pom.xml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -150,14 +150,14 @@
150150
<plugin>
151151
<groupId>org.apache.maven.plugins</groupId>
152152
<artifactId>maven-compiler-plugin</artifactId>
153-
<version>3.9.0</version>
153+
<version>3.10.1</version>
154154
</plugin>
155155

156156
<!-- Javadoc -->
157157
<plugin>
158158
<groupId>org.apache.maven.plugins</groupId>
159159
<artifactId>maven-javadoc-plugin</artifactId>
160-
<version>3.3.1</version>
160+
<version>3.4.1</version>
161161
<configuration>
162162
<archive>
163163
<manifestEntries>
@@ -186,7 +186,7 @@
186186
<plugin>
187187
<groupId>org.apache.maven.plugins</groupId>
188188
<artifactId>maven-enforcer-plugin</artifactId>
189-
<version>3.0.0</version>
189+
<version>3.2.1</version>
190190
<executions>
191191
<execution>
192192
<id>enforcer</id>
@@ -212,7 +212,7 @@
212212
<dependency>
213213
<groupId>org.codehaus.mojo</groupId>
214214
<artifactId>extra-enforcer-rules</artifactId>
215-
<version>1.5.1</version>
215+
<version>1.6.1</version>
216216
</dependency>
217217
</dependencies>
218218
</plugin>

0 commit comments

Comments
 (0)