1+ <?xml version =" 1.0" ?>
2+ <!DOCTYPE module PUBLIC
3+ "-//Checkstyle//DTD Checkstyle Configuration 1.3//EN"
4+ "https://checkstyle.org/dtds/configuration_1_3.dtd">
5+
6+ <!--
7+ Used in conjunction with google_checks_suppressions.xml to override
8+ https://github.com/checkstyle/checkstyle/blob/master/src/main/resources/google_checks.xml
9+ default rules. See
10+ https://stackoverflow.com/questions/63953276/maven-checkstyle-plugin-with-google-checks-and-4-space-indentsize
11+ for more info.
12+
13+ Also adds in additional rules, such as CyclomaticComplexity checks.
14+ -->
15+ <module name = " Checker" >
16+ <!-- Overrides -->
17+ <module name =" LineLength" >
18+ <property name =" fileExtensions" value =" java" />
19+ <property name =" max" value =" 150" />
20+ <property name =" ignorePattern" value =" ^package.*|^import.*|a href|href|http://|https://|ftp://|@ApiModelProperty| class .*" />
21+ </module >
22+
23+ <module name =" TreeWalker" >
24+ <!-- Overrides -->
25+ <module name =" Indentation" >
26+ <property name =" basicOffset" value =" 4" />
27+ <property name =" braceAdjustment" value =" 0" />
28+ <property name =" caseIndent" value =" 4" />
29+ <property name =" throwsIndent" value =" 4" />
30+ <property name =" lineWrappingIndentation" value =" 4" />
31+ <property name =" arrayInitIndent" value =" 8" />
32+ </module >
33+
34+ <!-- SPT Specific rules -->
35+
36+ <!-- SPT Custom -->
37+ <module name =" MatchXpath" >
38+ <property name =" query" value =" //VARIABLE_DEF/TYPE/IDENT[@text='var']" />
39+ <message key =" matchxpath.match" value =" The `var` keyword should be avoided to keep the code easier to understand" />
40+ </module >
41+
42+ <!-- Coding: https://checkstyle.sourceforge.io/checks/coding/index.html -->
43+ <module name =" DeclarationOrder" />
44+ <module name =" FinalLocalVariable" />
45+ <module name =" IllegalThrows" />
46+ <module name =" MagicNumber" />
47+ <module name =" NestedForDepth" />
48+ <module name =" NestedIfDepth" />
49+ <module name =" NestedTryDepth" />
50+ <module name =" ParameterAssignment" />
51+
52+ <!-- Imports: https://checkstyle.sourceforge.io/checks/imports/index.html -->
53+ <module name =" IllegalImport" />
54+ <module name =" RedundantImport" />
55+ <module name =" UnusedImports" />
56+
57+ <!-- Miscellaneous: https://checkstyle.sourceforge.io/checks/misc/todocomment.html -->
58+ <module name =" TodoComment" >
59+ <property name =" format" value =" (TODO)|(FIXME)" />
60+ </module >
61+
62+ <!-- Modifiers: https://checkstyle.sourceforge.io/checks/modifier/index.html -->
63+ <module name =" RedundantModifier" />
64+
65+ <!-- Naming Conventions: https://checkstyle.sourceforge.io/checks/naming/index.html -->
66+ <module name =" CatchParameterName" />
67+ <module name =" ConstantName" />
68+
69+ <!-- Size violations: https://checkstyle.sourceforge.io/checks/sizes/index.html -->
70+ <module name =" ParameterNumber" >
71+ <property name =" max" value =" 10" />
72+ <property name =" tokens" value =" CTOR_DEF" />
73+ </module >
74+ <module name =" ParameterNumber" >
75+ <property name =" max" value =" 5" />
76+ <property name =" tokens" value =" METHOD_DEF" />
77+ </module >
78+ </module >
79+ </module >
0 commit comments