forked from typedb/typedb
-
Notifications
You must be signed in to change notification settings - Fork 0
/
checkstyle.xml
85 lines (70 loc) · 2.67 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
81
82
83
84
85
<?xml version="1.0"?>
<!DOCTYPE module PUBLIC
"-//Puppy Crawl//DTD Check Configuration 1.3//EN"
"http://www.puppycrawl.com/dtds/configuration_1_3.dtd">
<module name="Checker">
<!-- Use 4 spaces, not tabs -->
<module name="FileTabCharacter">
<property name="eachLine" value="true"/>
</module>
<module name="TreeWalker">
<!-- Java filename must match name of outer class -->
<module name="OuterTypeFilename"/>
<!-- Use \n, \b etc. instead of octal or unicode escape (e.g. \012) -->
<module name="IllegalTokenText">
<property name="tokens" value="STRING_LITERAL, CHAR_LITERAL"/>
<property name="format" value="\\u00(08|09|0(a|A)|0(c|C)|0(d|D)|22|27|5(C|c))|\\(0(10|11|12|14|15|42|47)|134)"/>
<property name="message" value="Avoid using corresponding octal or Unicode escape."/>
</module>
<!-- Disallow unicode escapes, except control or non-printable chars -->
<module name="AvoidEscapedUnicodeCharacters">
<property name="allowEscapesForControlCharacters" value="true"/>
<property name="allowByTailComment" value="true"/>
<property name="allowNonPrintableEscapes" value="true"/>
</module>
<!-- Avoid wildcard star imports -->
<module name="AvoidStarImport"/>
<!-- Only one top-level class per file -->
<module name="OneTopLevelClass"/>
<!-- No line-wrapping on import and package statements, e.g.
```
import long.import.
.on.many.Lines;
```
-->
<module name="NoLineWrap"/>
<!-- No empty blocks allowed -->
<module name="EmptyBlock"/>
<!-- In some cases, empty blocks are allowed with a comment inside, e.g.
This is bad:
```
try {
doThing();
} catch (MyException ex) {}
```
This is fine:
```
try {
doThing();
} catch (MyException ex) {
// I'm ignoring this for a good reason, I promise!
}
```
-->
<module name="EmptyBlock">
<property name="option" value="text"/>
<property name="tokens" value="LITERAL_CATCH, LITERAL_CASE, LITERAL_DEFAULT, ARRAY_INIT"/>
</module>
<!-- No multi-line statements without braces, e.g.
```
if (youDoThis)
maven.willGetAngry();
```
-->
<module name="NeedBraces">
<property name="allowSingleLineStatement" value="true"/>
</module>
<!-- Allow only one statement per line -->
<module name="OneStatementPerLine"/>
</module>
</module>