This repository has been archived by the owner on Jul 23, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 26
/
checkstyle.xml
59 lines (48 loc) · 2.29 KB
/
checkstyle.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
<?xml version="1.0" ?>
<!DOCTYPE module PUBLIC
"-//Checkstyle//DTD Checkstyle Configuration 1.2//EN"
"https://checkstyle.org/dtds/configuration_1_2.dtd">
<module name="Checker">
<module name="TreeWalker">
<!-- No if/else/do/for/while without braces -->
<module name="NeedBraces"/>
<!-- No empty blocks -->
<module name="EmptyBlock"/>
<!-- Disallow unnecessary instantiation of Boolean, String -->
<module name="IllegalInstantiation">
<!-- property name="classes" value="java.lang.Boolean, java.lang.String"/ -->
<property name="classes" value="java.lang.Boolean"/>
</module>
<!-- Import should be explicit, really needed and only from pure java packages -->
<module name="AvoidStarImport" />
<module name="UnusedImports" />
<module name="IllegalImport" />
<!-- TODO: Find how to exclude spring application classes and uncomment -->
<!-- Check https://checkstyle.org/config_filters.html#SuppressionXpathSingleFilter -->
<!-- Utility class should not be instantiated, they must have a private constructor -->
<!-- module name="HideUtilityClassConstructor" /-->
<!-- No System.out.println() statements -->
<module name="Regexp">
<!-- no sysouts -->
<property name="format" value="System\.out\.println"/>
<property name="illegalPattern" value="true"/>
</module>
<!-- No trailing whitespace -->
<module name="Regexp">
<property name="format" value="[ \t]+$"/>
<property name="illegalPattern" value="true"/>
<property name="message" value="Trailing whitespace"/>
</module>
<!-- Use static import for mockito -->
<module name="Regexp">
<property name="format" value="^(?!import).*Mockito\."/>
<property name="illegalPattern" value="true"/>
<property name="message" value="Use static import for Mockito"/>
</module>
<module name="Regexp">
<property name="format" value="^(?!import).*Assertions\."/>
<property name="illegalPattern" value="true"/>
<property name="message" value="Use static import for Assertions"/>
</module>
</module>
</module>