Skip to content

Commit b36eadd

Browse files
Merge pull request #66 from BorderTech/latest-qa
Latest qa
2 parents 55deb59 + c7d8653 commit b36eadd

File tree

5 files changed

+223
-90
lines changed

5 files changed

+223
-90
lines changed

CHANGELOG.md

+78
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
# Change log
2+
3+
## Release in-progress
4+
* Add quick-build profile that skips tests and QA checks #63
5+
* Change OWASP checker to fail on Critical (Level 9-10) issues and check for updates every 12 hours #60
6+
* Update dependencies and plugin versions.
7+
* Update bt-checkstyle.xml to include latest checks from checkstyle's sun_check.xml.
8+
* Plugin configuration is only done via user properties which is easier for projects to override #59
9+
10+
## 1.0.15
11+
* Refactor README #52
12+
* Update plugin versions #54
13+
14+
## 1.0.14
15+
* Update README.
16+
* Latest checkstyle and pmd.
17+
18+
## 1.0.13
19+
* Remove redundant ${bt.plugin.xxxx} properties. Use plugin user properties instead.
20+
* Update QA override details in README.
21+
* Update bt-checkstyle.xml to include the latest checkstyle sun-check.xml changes.
22+
* Delete bt-spotbugs-exclude-filter.xml as projects should handle their own excludes.
23+
* Introduce ${bt.version} properties for dependency versions.
24+
* Introduce maven version checker to display updates for project dependencies.
25+
* Move enforce dependency convergence to qa-parent
26+
27+
## 1.0.12
28+
* Updated plugin versions.
29+
* Enhance vulnerability checking.
30+
* Minor fixes to README.
31+
32+
## 1.0.11
33+
* Update OWASP properties.
34+
35+
## 1.0.10
36+
* Include dependency convergence check in the maven enforcer plugin.
37+
38+
## 1.0.9
39+
* Fix Jacoco Coverage Report.
40+
41+
## 1.0.8
42+
* Latest rules and versions of checkstyle, pmd and spotbugs (formerly findbugs).
43+
* Removed wc.qa.skip property to only use bt.qa.skip.
44+
* Removed surefire.version property as use plugin inheritance for version.
45+
* Upgrade to junit 5.
46+
47+
## 1.0.7
48+
* Update version of dependency-check-maven and change default config.
49+
* Remove site generation.
50+
51+
## 1.0.6
52+
* Added properties to manage non-java analysers in the dependency check plugin (see wiki).
53+
* Turned off the following analysers (in default configuration):
54+
* nsp analyzer;
55+
* nuspec analyzer;
56+
* swift package manager analyzer; and
57+
* assembly analyzer.
58+
* Incremented version of dependency-check-maven to 3.3.2.
59+
60+
## 1.0.5
61+
* Added support for OWASP dependency checker using dependency-check-maven.
62+
63+
## 1.0.4
64+
* Update README.
65+
* Added bt.qa.skip property.
66+
* Fix badger version.
67+
68+
## 1.0.3
69+
* Added qa-parent.
70+
71+
## 1.0.2
72+
* Generate javadoc and sources in release.
73+
74+
## 1.0.1
75+
* Surefire version property.
76+
77+
## 1.0.0
78+
* Initial version
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
<?xml version="1.0"?>
22
<!DOCTYPE module PUBLIC
3-
"-//Puppy Crawl//DTD Check Configuration 1.3//EN"
4-
"http://www.puppycrawl.com/dtds/configuration_1_3.dtd">
3+
"-//Checkstyle//DTD Checkstyle Configuration 1.3//EN"
4+
"https://checkstyle.org/dtds/configuration_1_3.dtd">
55

6-
<!-- Based on sun_checks.xml (V8.2) -->
6+
<!-- Based on sun_checks.xml (V8.30) -->
77

88
<!--
99
Checkstyle configuration that checks the sun coding conventions from:
@@ -15,9 +15,10 @@
1515
- the JDK Api documentation https://docs.oracle.com/en/java/javase/11/
1616
- some best practices
1717
Checkstyle is very configurable. Be sure to read the documentation at
18-
http://checkstyle.sourceforge.net (or in your downloaded distribution).
18+
https://checkstyle.org (or in your downloaded distribution).
1919
Most Checks are configurable, be sure to consult the documentation.
2020
To completely disable a check, just comment it out or delete it from the file.
21+
To suppress certain violations please review suppression filters.
2122
Finally, it is worth reading the documentation.
2223
-->
2324

@@ -28,12 +29,13 @@
2829
https://checkstyle.org/5.x/config.html#Checker
2930
<property name="basedir" value="${basedir}"/>
3031
-->
32+
<property name="severity" value="error"/>
3133

32-
33-
<!-- BorderTech Filter out Checkstyle warnings that have been suppressed with the @SuppressWarnings annotation -->
34+
<!-- BorderTech: Filter out Checkstyle warnings that have been suppressed with the @SuppressWarnings annotation. -->
35+
<!-- SuppressWarningsFilter and SuppressWarningsHolder have to be used together. -->
3436
<module name="SuppressWarningsFilter" />
3537

36-
<!-- BorderTech
38+
<!-- BorderTech: only check java files
3739
<property name="fileExtensions" value="java, properties, xml"/>
3840
-->
3941
<property name="fileExtensions" value="java"/>
@@ -44,118 +46,133 @@
4446
<property name="fileNamePattern" value="module\-info\.java$"/>
4547
</module>
4648

49+
<!-- https://checkstyle.org/config_filters.html#SuppressionFilter -->
50+
<module name="SuppressionFilter">
51+
<property name="file" value="${org.checkstyle.sun.suppressionfilter.config}"
52+
default="checkstyle-suppressions.xml" />
53+
<property name="optional" value="true"/>
54+
</module>
55+
4756
<!-- Checks that a package-info.java file exists for each package. -->
48-
<!-- See http://checkstyle.sourceforge.net/config_javadoc.html#JavadocPackage -->
57+
<!-- See https://checkstyle.org/config_javadoc.html#JavadocPackage -->
4958
<module name="JavadocPackage"/>
5059

5160
<!-- Checks whether files end with a new line. -->
52-
<!-- See http://checkstyle.sourceforge.net/config_misc.html#NewlineAtEndOfFile -->
53-
<module name="NewlineAtEndOfFile">
54-
<!-- BorderTech
55-
Choosing "lf" should allow eof to be either "LF" or "CRLF" (both end with "LF").
56-
This is more permissive and more predicatable than the default "enforce whatever line separator is default on the current platform".
57-
When fetching code via git newlines are usually normalized anyway.
58-
-->
59-
<property name="lineSeparator" value="lf"/>
60-
</module>
61+
<!-- See https://checkstyle.org/config_misc.html#NewlineAtEndOfFile -->
62+
<module name="NewlineAtEndOfFile"/>
6163

6264
<!-- Checks that property files contain the same keys. -->
63-
<!-- See http://checkstyle.sourceforge.net/config_misc.html#Translation -->
65+
<!-- See https://checkstyle.org/config_misc.html#Translation -->
6466
<module name="Translation"/>
6567

6668
<!-- Checks for Size Violations. -->
67-
<!-- See http://checkstyle.sourceforge.net/config_sizes.html -->
69+
<!-- See https://checkstyle.org/config_sizes.html -->
6870
<module name="FileLength">
71+
<!-- BorderTech: Override to warning -->
72+
<property name="severity" value="warning" />
73+
</module>
74+
<module name="LineLength">
75+
<property name="fileExtensions" value="java"/>
76+
<!-- BorderTech: Override from 80 to 150 -->
77+
<property name="max" value="150" />
78+
<!-- BorderTech: Override to warning -->
6979
<property name="severity" value="warning" />
7080
</module>
7181

72-
<!-- Checks for whitespace -->
73-
<!-- See http://checkstyle.sourceforge.net/config_whitespace.html -->
74-
<!--
82+
<!-- See https://checkstyle.org/config_whitespace.html -->
83+
<!-- BorderTech: This check is removed as it fails if there are tabs
7584
<module name="FileTabCharacter"/>
7685
-->
86+
87+
<!-- BorderTech: Use tabs for indenting -->
7788
<module name="RegexpSingleline">
7889
<property name="format" value="^(\t*( +\t*(?! \*|\S))|( ))"/>
7990
<property name="message" value="Indentation should be tabs."/>
8091
<property name="maximum" value="10"/>
8192
</module>
8293

8394
<!-- Miscellaneous other checks. -->
84-
<!-- See http://checkstyle.sourceforge.net/config_misc.html -->
95+
<!-- See https://checkstyle.org/config_misc.html -->
8596
<module name="RegexpSingleline">
8697
<property name="format" value="\s+$"/>
87-
<property name="maximum" value="10"/>
98+
<property name="minimum" value="0"/>
99+
<property name="maximum" value="0"/>
88100
<property name="message" value="Line has trailing spaces."/>
101+
<!-- BorderTech: Override to warning -->
102+
<property name="severity" value="warning" />
89103
</module>
90104

91105
<!-- Checks for Headers -->
92-
<!-- See http://checkstyle.sourceforge.net/config_header.html -->
106+
<!-- See https://checkstyle.org/config_header.html -->
93107
<!-- <module name="Header"> -->
94108
<!-- <property name="headerFile" value="${checkstyle.header.file}"/> -->
95109
<!-- <property name="fileExtensions" value="java"/> -->
96110
<!-- </module> -->
97111

98112
<module name="TreeWalker">
99-
<!-- BorderTech -->
113+
114+
<!-- BorderTech: Override for how many spaces a tab takes from 8 to 4 -->
100115
<property name="tabWidth" value="4"/>
101116

102-
<!-- BorderTech Make the @SuppressWarnings annotations available to Checkstyle -->
117+
<!-- BorderTech: Make the @SuppressWarnings annotations available to Checkstyle -->
118+
<!-- SuppressWarningsFilter and SuppressWarningsHolder have to be used together. -->
103119
<module name="SuppressWarningsHolder" />
104120

105121
<!-- Checks for Javadoc comments. -->
106-
<!-- See http://checkstyle.sourceforge.net/config_javadoc.html -->
122+
<!-- See https://checkstyle.org/config_javadoc.html -->
123+
<module name="InvalidJavadocPosition"/>
107124
<module name="JavadocMethod">
125+
<!-- BorderTech: Javadoc not required for methods with these annotations -->
108126
<property name="allowedAnnotations" value="Override,Test,Before,After,BeforeClass,AfterClass"/>
109127
</module>
110128
<module name="JavadocType"/>
111129
<module name="JavadocVariable">
130+
<!-- BorderTech: Push scope that is checked from private to protected -->
112131
<property name="scope" value="protected"/>
113132
</module>
114133
<module name="JavadocStyle"/>
134+
<module name="MissingJavadocMethod"/>
115135

116136
<!-- Checks for Naming Conventions. -->
117-
<!-- See http://checkstyle.sourceforge.net/config_naming.html -->
118-
<module name="ConstantName" />
137+
<!-- See https://checkstyle.org/config_naming.html -->
138+
<module name="ConstantName"/>
119139
<module name="LocalFinalVariableName"/>
120140
<module name="LocalVariableName"/>
121141
<module name="MemberName"/>
122142
<module name="MethodName"/>
123143
<module name="PackageName"/>
124144
<module name="ParameterName"/>
125145
<module name="StaticVariableName"/>
126-
<module name="TypeName" />
146+
<module name="TypeName"/>
127147

128148
<!-- Checks for imports -->
129-
<!-- See http://checkstyle.sourceforge.net/config_import.html -->
149+
<!-- See https://checkstyle.org/config_import.html -->
130150
<module name="AvoidStarImport"/>
131151
<module name="IllegalImport"/> <!-- defaults to sun.* packages -->
132152
<module name="RedundantImport"/>
133153
<module name="UnusedImports">
134-
<!-- BorderTech -->
154+
<!-- BorderTech: Check javadoc as well -->
135155
<property name="processJavadoc" value="true" />
136156
</module>
137157

138158
<!-- Checks for Size Violations. -->
139-
<!-- See http://checkstyle.sourceforge.net/config_sizes.html -->
140-
<module name="LineLength">
141-
<!-- BorderTech -->
142-
<property name="max" value="150" />
143-
<property name="severity" value="warning" />
144-
</module>
159+
<!-- See https://checkstyle.org/config_sizes.html -->
145160
<module name="MethodLength">
161+
<!-- BorderTech: Override to warning -->
146162
<property name="severity" value="warning" />
147163
</module>
148164
<module name="ParameterNumber">
165+
<!-- BorderTech: Override to warning -->
149166
<property name="severity" value="warning" />
150167
</module>
151168

152169
<!-- Checks for whitespace -->
153-
<!-- See http://checkstyle.sourceforge.net/config_whitespace.html -->
170+
<!-- See https://checkstyle.org/config_whitespace.html -->
154171
<module name="EmptyForIteratorPad"/>
155172
<module name="GenericWhitespace"/>
156173
<module name="MethodParamPad"/>
157174
<module name="NoWhitespaceAfter">
158-
<!-- BorderTech -->
175+
<!-- BorderTech: Tokens to check -->
159176
<property name="tokens" value="BNOT,DEC,DOT,INC,LNOT,UNARY_MINUS,UNARY_PLUS"/>
160177
</module>
161178
<module name="NoWhitespaceBefore"/>
@@ -166,53 +183,63 @@
166183
<module name="WhitespaceAround"/>
167184

168185
<!-- Modifier Checks -->
169-
<!-- See http://checkstyle.sourceforge.net/config_modifiers.html -->
186+
<!-- See https://checkstyle.org/config_modifiers.html -->
170187
<module name="ModifierOrder"/>
171188
<module name="RedundantModifier">
189+
<!-- BorderTech: Override to warning -->
172190
<property name="severity" value="warning" />
173191
</module>
174192

175193
<!-- Checks for blocks. You know, those {}'s -->
176194
<!-- See http://checkstyle.sourceforge.net/config_blocks.html -->
177195
<module name="AvoidNestedBlocks">
178-
<!-- BorderTech -->
196+
<!-- BorderTech: Allow a nested block in a switch -->
179197
<property name="allowInSwitchCase" value="true"/>
180198
</module>
181199
<module name="EmptyBlock">
200+
<!-- BorderTech: Override to warning -->
182201
<property name="severity" value="warning" />
183202
</module>
184203
<module name="LeftCurly"/>
185204
<module name="NeedBraces"/>
186205
<module name="RightCurly"/>
187206

188207
<!-- Checks for common coding problems -->
189-
<!-- See http://checkstyle.sourceforge.net/config_coding.html -->
190-
<!-- BorderTech
191-
<module name="AvoidInlineConditionals"/>
192-
-->
208+
<!-- See https://checkstyle.org/config_coding.html -->
193209
<module name="EmptyStatement">
210+
<!-- BorderTech: Override to warning -->
194211
<property name="severity" value="warning" />
195212
</module>
196213
<module name="EqualsHashCode"/>
197214
<module name="HiddenField">
198-
<!-- BorderTech -->
199-
<property name="severity" value="ignore" />
215+
<!-- BorderTech: Override from false for constructor parameters -->
216+
<property name="ignoreConstructorParameter" value = "true" />
217+
<!-- BorderTech: Override from false for setter parameters -->
218+
<property name="ignoreSetter" value = "true" />
219+
<!-- BorderTech: Override to warning -->
220+
<property name="severity" value="warning" />
200221
</module>
201222
<module name="IllegalInstantiation"/>
202223
<module name="InnerAssignment"/>
203224
<module name="MagicNumber">
204-
<property name="severity" value="ignore" />
225+
<!-- BorderTech: Override from false for hash code methods -->
226+
<property name="ignoreHashCodeMethod" value = "true" />
227+
<!-- BorderTech: Override from false for annotation methods -->
228+
<property name="ignoreAnnotation" value = "true" />
229+
<!-- BorderTech: Override to warning -->
230+
<property name="severity" value="warning" />
205231
</module>
206232
<module name="MissingSwitchDefault">
233+
<!-- BorderTech: Override to warning -->
207234
<property name="severity" value="warning" />
208235
</module>
209236
<module name="MultipleVariableDeclarations"/>
210237
<module name="SimplifyBooleanExpression"/>
211238
<module name="SimplifyBooleanReturn"/>
212239

213240
<!-- Checks for class design -->
214-
<!-- See http://checkstyle.sourceforge.net/config_design.html -->
215-
<!-- BorderTech
241+
<!-- See https://checkstyle.org/config_design.html -->
242+
<!-- BorderTech: This check is specific for library projects (not applications)
216243
<module name="DesignForExtension"/>
217244
-->
218245
<module name="FinalClass"/>
@@ -221,16 +248,24 @@
221248
<module name="VisibilityModifier"/>
222249

223250
<!-- Miscellaneous other checks. -->
224-
<!-- See http://checkstyle.sourceforge.net/config_misc.html -->
251+
<!-- See https://checkstyle.org/config_misc.html -->
225252
<!--
226-
<module name="ArrayTypeStyle"/>
253+
<module name="ArrayTypeStyle"/>
227254
-->
228255
<module name="FinalParameters"/>
229256
<module name="TodoComment">
257+
<!-- BorderTech: Override to warning -->
230258
<property name="severity" value="warning" />
231259
</module>
232260
<module name="UpperEll"/>
233261

262+
<!-- https://checkstyle.org/config_filters.html#SuppressionXpathFilter -->
263+
<module name="SuppressionXpathFilter">
264+
<property name="file" value="${org.checkstyle.sun.suppressionxpathfilter.config}"
265+
default="checkstyle-xpath-suppressions.xml" />
266+
<property name="optional" value="true"/>
267+
</module>
268+
234269
</module>
235270

236271
</module>

0 commit comments

Comments
 (0)