Repository navigation
Expand file tree
/
Copy pathcheckstyle.xml
More file actions
54 lines (48 loc) · 2.04 KB
/
Copy pathcheckstyle.xml
File metadata and controls
54 lines (48 loc) · 2.04 KB
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
<?xml version="1.0"?>
<!DOCTYPE module PUBLIC
"-//Checkstyle//DTD Checkstyle Configuration 1.3//EN"
"https://checkstyle.org/dtds/configuration_1_3.dtd">
<!-- Checkstyle configuration for the Java port.
A focused, low-noise rule set: it targets real maintainability problems
(unused imports, empty blocks, equals/hashCode, fall-through) rather than
full formatting enforcement. The brace-placement / braceless-`if` rules
(NeedBraces, LeftCurly, RightCurly) are intentionally off — this port
mirrors the canonical TypeScript source layout, which uses braceless
single-statement `if`s and TS-style brace placement throughout. -->
<module name="Checker">
<property name="charset" value="UTF-8"/>
<property name="severity" value="warning"/>
<property name="fileExtensions" value="java"/>
<module name="LineLength">
<property name="max" value="140"/>
<property name="ignorePattern" value="^package.*|^import.*|a href|href|http://|https://"/>
</module>
<module name="TreeWalker">
<!-- Imports -->
<module name="UnusedImports"/>
<module name="RedundantImport"/>
<module name="AvoidStarImport"/>
<!-- Blocks -->
<module name="EmptyBlock">
<property name="option" value="text"/>
</module>
<!-- Coding problems -->
<module name="EqualsHashCode"/>
<module name="FallThrough"/>
<module name="MissingSwitchDefault"/>
<module name="SimplifyBooleanExpression"/>
<module name="SimplifyBooleanReturn"/>
<module name="StringLiteralEquality"/>
<module name="EmptyStatement"/>
<!-- OneStatementPerLine off: the in-tree `_jsonifyInner` (and a few
other tight TS-mirror sites) use `if (cond) { x; return; }`
one-liners that mirror the canonical TS layout. The rest of the
braceless-`if` exception note above applies. -->
<module name="UpperEll"/>
<module name="ModifierOrder"/>
<!-- Whitespace -->
<module name="WhitespaceAfter"/>
<module name="NoWhitespaceBefore"/>
<module name="GenericWhitespace"/>
</module>
</module>