-
Notifications
You must be signed in to change notification settings - Fork 40.9k
/
Copy pathcheckstyle.xml
80 lines (80 loc) · 4.12 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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
<?xml version="1.0"?>
<!DOCTYPE module PUBLIC
"-//Checkstyle//DTD Checkstyle Configuration 1.3//EN"
"https://checkstyle.org/dtds/configuration_1_3.dtd">
<module name="com.puppycrawl.tools.checkstyle.Checker">
<module name="SuppressionFilter">
<property name="file" value="${config_loc}/checkstyle-suppressions.xml"/>
</module>
<module name="io.spring.javaformat.checkstyle.SpringChecks" />
<module name="com.puppycrawl.tools.checkstyle.TreeWalker">
<module name="io.spring.javaformat.checkstyle.check.SpringDeprecatedCheck" />
<module name="io.spring.javaformat.checkstyle.check.SpringJUnit5Check" />
<module
name="com.puppycrawl.tools.checkstyle.checks.imports.IllegalImportCheck">
<property name="regexp" value="true" />
<property name="illegalPkgs"
value="^sun.*, ^org\.apache\.commons\.(?!compress|dbcp2|logging|pool2).*, ^com\.datastax\.oss\.driver\.shaded.*, ^com\.google\.common.*, ^io\.micrometer\.core\.lang.*, ^io\.micrometer\.shaded.*, ^org\.jetbrains\.annotations.*, ^org\.testcontainers\.shaded.*" />
<property name="illegalClasses"
value="^com\.hazelcast\.util\.Base64, ^org\.junit\.rules\.ExpectedException, ^org\.mockito\.InjectMocks, ^org\.slf4j\.LoggerFactory, ^org.springframework.context.annotation.ScannedGenericBeanDefinition, ^reactor\.core\.support\.Assert"/>
</module>
<module
name="com.puppycrawl.tools.checkstyle.checks.imports.IllegalImportCheck">
<property name="id" value="mainCodeIllegalImportCheck"/>
<property name="regexp" value="true" />
<property name="illegalClasses"
value="javax.annotation.PostConstruct, jakarta.annotation.PostConstruct"/>
<property name="illegalPkgs"
value="^io\.opentelemetry\.semconv.*"/>
</module>
<module
name="com.puppycrawl.tools.checkstyle.checks.imports.ImportControlCheck">
<property name="file"
value="${config_loc}/import-control.xml" />
<property name="path" value="^.*[\\/]src[\\/]main[\\/].*$" />
</module>
<module name="com.puppycrawl.tools.checkstyle.checks.regexp.RegexpSinglelineJavaCheck">
<property name="maximum" value="0"/>
<property name="format" value="org\.junit\.Assert|org\.junit\.jupiter\.api\.Assertions" />
<property name="message"
value="Please use AssertJ imports." />
<property name="ignoreComments" value="true" />
</module>
<module
name="com.puppycrawl.tools.checkstyle.checks.regexp.RegexpSinglelineJavaCheck">
<property name="maximum" value="0" />
<property name="format"
value="assertThatExceptionOfType\((NullPointerException|IllegalArgumentException|IOException|IllegalStateException)\.class\)" />
<property name="message"
value="Please use specialized AssertJ assertThat*Exception method." />
<property name="ignoreComments" value="true" />
</module>
<module
name="com.puppycrawl.tools.checkstyle.checks.regexp.RegexpSinglelineJavaCheck">
<property name="maximum" value="0" />
<property name="format"
value="assertThatThrownBy\(" />
<property name="message"
value="Please use AssertJ assertThatExceptionOfType method." />
<property name="ignoreComments" value="true" />
</module>
<module name="com.puppycrawl.tools.checkstyle.checks.regexp.RegexpSinglelineJavaCheck">
<property name="maximum" value="0"/>
<property name="format" value="org\.mockito\.(Mockito|BDDMockito)\.(when|doThrow|doAnswer|doReturn|verify|verifyNoInteractions|verifyNoMoreInteractions)" />
<property name="message"
value="Please use BDD-style (given, when, then) using BDDMockito imports." />
<property name="ignoreComments" value="true" />
</module>
<module name="com.puppycrawl.tools.checkstyle.checks.regexp.RegexpSinglelineJavaCheck">
<property name="maximum" value="0"/>
<property name="format" value="(List|Map|Set)\.of\(\)" />
<property name="message"
value="Please use Collections.emptyList()/emptyMap()/emptySet() for creating empty lists/maps/sets." />
<property name="ignoreComments" value="true" />
</module>
<module name="io.spring.javaformat.checkstyle.check.SpringJavadocCheck">
<property name="publicOnlySinceTags" value="true" />
<property name="requireSinceTag" value="true" />
</module>
</module>
</module>