-
Notifications
You must be signed in to change notification settings - Fork 40
/
checkstyle.xml
802 lines (776 loc) · 38.6 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
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
<?xml version="1.0"?>
<!DOCTYPE module PUBLIC
"-//Checkstyle//DTD Checkstyle Configuration 1.3//EN"
"https://checkstyle.org/dtds/configuration_1_3.dtd">
<module name="Checker">
<metadata name="org.checkstyle.principle" value="Practice What You Preach"/>
<metadata name="org.checkstyle.principle.description"
value="In our config we should use all Checks that Checkstyle has"/>
<property name="severity" value="error"/>
<property name="fileExtensions" value="java, properties, xml, vm, g, g4, dtd"/>
<!-- BeforeExecutionFileFilters is required for sources that are based on java9 -->
<module name="BeforeExecutionExclusionFileFilter">
<property name="fileNamePattern" value="module\-info\.java$" />
</module>
<!-- Filters -->
<module name="SeverityMatchFilter">
<!-- report all violations except ignore -->
<property name="severity" value="ignore"/>
<property name="acceptOnMatch" value="false"/>
</module>
<!-- Tone down the checking for test code -->
<module name="SuppressionSingleFilter">
<property name="checks" value="JavadocPackage"/>
<property name="files" value=".*[\\/]src[\\/](test|it)[\\/]"/>
</module>
<module name="SuppressionSingleFilter">
<property name="checks" value="JavadocMethod"/>
<property name="files" value=".*[\\/]src[\\/](test|it)[\\/].*(?<!Support)\.java"/>
</module>
<module name="SuppressWarningsFilter"/>
<module name="SuppressWithPlainTextCommentFilter">
<!--
Use suppressions.xml for suppressions, this is only example.
checkFormat will prevent suppression comments from being valid.
-->
<property name="checkFormat" value="IGNORETHIS"/>
<property name="offCommentFormat" value="CSOFF\: .*"/>
<property name="onCommentFormat" value="CSON\: .*"/>
</module>
<!-- Miscellaneous -->
<module name="NewlineAtEndOfFile"/>
<module name="Translation">
<property name="requiredTranslations" value="de, fr, fi, es, pt, ja, tr, zh"/>
</module>
<module name="UniqueProperties"/>
<module name="OrderedProperties" />
<!-- Regexp -->
<module name="RegexpMultiline">
<property name="id" value="regexpMultilineDefault"/>
</module>
<module name="RegexpMultiline">
<property name="id" value="noIndentationConfigExamples"/>
<property name="format" value="<source>\r?\n\s+"/>
<property name="fileExtensions" value="xml"/>
<property name="message" value="Content of source tag should not be Indented"/>
</module>
<module name="RegexpMultiline">
<property name="id" value="noConsecutiveLines"/>
<property name="format" value="\r?\n[\t ]*\r?\n[\t ]*\r?\n"/>
<property name="fileExtensions" value="java,xml,properties"/>
<property name="message" value="Unnecessary consecutive lines"/>
</module>
<module name="RegexpMultiline">
<property name="id" value="commentFirstSentenceMultiline"/>
<property name="format" value="/\*\*\W+\* +\p{javaLowerCase}"/>
<property name="fileExtensions" value="java"/>
<property name="message"
value="First sentence in a comment should start with a capital letter"/>
</module>
<module name="RegexpMultiline">
<property name="id" value="noEmptyFile"/>
<property name="format" value="^\s*$" />
<property name="matchAcrossLines" value="true" />
<property name="message" value="Empty file is not allowed" />
</module>
<module name="RegexpSingleline">
<property name="id" value="noTrailingWhitespace"/>
<property name="format" value="\s+$"/>
<property name="minimum" value="0"/>
<property name="maximum" value="0"/>
<property name="message" value="Trailing whitespace is not allowed"/>
</module>
<!-- This is needed for correct metadata generation -->
<module name="RegexpSingleline">
<property name="id" value="propertyTypeOnNewLine"/>
<property name="format" value="^ \* .+(Type|Default value|Validation type) is \{@code "/>
<property name="minimum" value="0"/>
<property name="maximum" value="0"/>
<property name="message" value="Property attribute should be on new javadoc line"/>
</module>
<module name="RegexpSingleline">
<property name="id" value="commentFirstSentenceSingleline"/>
<property name="format" value="/\*\* +\p{javaLowerCase}"/>
<property name="fileExtensions" value="java"/>
<property name="message"
value="First sentence in a comment should start with a capital letter"/>
</module>
<module name="RegexpSingleline">
<property name="id" value="assertThatShouldBeOnSeparateLine"/>
<property name="format" value="assertWithMessage\(.*\).that\("/>
<property name="fileExtensions" value="java"/>
<property name="message"
value="Truth''s ''that'' method call should be on separate line"/>
</module>
<module name="RegexpSingleline">
<property name="id" value="lineLengthGrammar"/>
<property name="format" value="^(?!(.*http|import)).{121,}$"/>
<property name="fileExtensions" value="g, g4"/>
<property name="message" value="Line should not be longer than 120 symbols"/>
</module>
<module name="RegexpSingleline">
<property name="id" value="lineLengthXml"/>
<property name="format"
value="^(?!(\s*,?\s*<a href="[^"]+">|.*http)).{121,}$"/>
<property name="fileExtensions" value="xml, vm"/>
<property name="message" value="Line should not be longer than 120 symbols"/>
</module>
<!--
Links to .dtd files should start with "/", "http://" or "https://",
otherwise they will be broken after archiving the documentation.
See https://github.com/checkstyle/checkstyle/issues/7340 for details.
-->
<module name="RegexpSingleline">
<property name="id" value="noRelativeLinks"/>
<property name="format" value="href="(?!\/|https?:\/\/).*?\.dtd""/>
<property name="fileExtensions" value="xml, vm"/>
<property name="message"
value="Relative links to DTD files are prohibited. Please use absolute path or uri instead."/>
</module>
<module name="RegexpSingleline">
<property name="id" value="noSourceforgeNetLinks"/>
<property name="format" value="checkstyle\.sourceforge\.net"/>
<property name="message"
value="Old site links should not be used, please use https://checkstyle.org"/>
</module>
<module name="RegexpSingleline">
<property name="id" value="noSourceforgeIoLinks"/>
<property name="format" value="checkstyle\.sourceforge\.io"/>
<property name="message"
value="Old site links should not be used, please use https://checkstyle.org"/>
</module>
<module name="RegexpSingleline">
<property name="id" value="noPackageCommentWithOtherVisibility"/>
<property name="format" value="/\*\s+package\s+\*/\s+(private|protected|public)"/>
<property name="fileExtensions" value="java"/>
<property name="message"
value="Package comment marker should not be used if other visibility is defined"/>
</module>
<module name="RegexpOnFilename">
<property name="id" value="regexpOnFilenameWithSpace"/>
</module>
<module name="RegexpOnFilename">
<property name="id" value="javaFileLocation"/>
<property name="folderPattern" value="[\\/]src[\\/]\w+[\\/]java[\\/]"/>
<property name="fileNamePattern" value="\.java$"/>
<property name="match" value="false"/>
<message key="regexp.filepath.mismatch"
value="Only java files should be located in the ''src/*/java'' folders."/>
</module>
<module name="RegexpOnFilename">
<property name="id" value="xmlFileLocation"/>
<property name="folderPattern" value="[\\/]src[\\/]xdocs[\\/]"/>
<property name="fileNamePattern" value="\.(xml)|(vm)$"/>
<property name="match" value="false"/>
<message key="regexp.filepath.mismatch"
value="All files in the ''src/xdocs'' folder should have the ''xml'' or ''vm'' extension."/>
</module>
<module name="RegexpOnFilename">
<property name="id" value="testFileLocation"/>
<property name="folderPattern" value="[\\/]src[\\/]it[\\/]java[\\/]"/>
<property name="fileNamePattern" value="^((\w+Test)|(\w+TestSupport)|(Abstract\w+))\.java$"/>
<property name="match" value="false"/>
<message key="regexp.filepath.mismatch"
value="All files in the ''src/it/java'' folder
should be named ''*Test.java'' or ''Abstract*.java''."/>
</module>
<!-- Size Violations -->
<module name="FileLength">
<property name="fileExtensions" value="java"/>
</module>
<module name="LineLength">
<property name="fileExtensions" value="java"/>
<property name="max" value="120"/>
<property name="ignorePattern" value="^ *\* *([^ ]+|\{@code .*|<a href="[^"]+">)$"/>
</module>
<!-- Whitespace -->
<module name="FileTabCharacter">
<property name="eachLine" value="false"/>
</module>
<module name="TreeWalker">
<property name="tabWidth" value="4"/>
<!-- Annotations -->
<module name="AnnotationLocation">
<property name="tokens" value="ANNOTATION_DEF"/>
<property name="tokens" value="ANNOTATION_FIELD_DEF"/>
<property name="tokens" value="PACKAGE_DEF"/>
<property name="tokens" value="ENUM_CONSTANT_DEF"/>
<property name="tokens" value="VARIABLE_DEF"/>
<property name="allowSamelineSingleParameterlessAnnotation" value="false"/>
</module>
<module name="AnnotationOnSameLine">
<!-- we can not use it as it conflicts with AnnotationLocation -->
<property name="severity" value="ignore"/>
<property name="tokens" value="METHOD_DEF"/>
<property name="tokens" value="CTOR_DEF"/>
<property name="tokens" value="TYPECAST"/>
<property name="tokens" value="DOT"/>
<property name="tokens" value="CLASS_DEF"/>
<property name="tokens" value="ENUM_DEF"/>
<property name="tokens" value="INTERFACE_DEF"/>
<property name="tokens" value="TYPE_ARGUMENT"/>
<property name="tokens" value="ANNOTATION_DEF"/>
<property name="tokens" value="LITERAL_NEW"/>
<property name="tokens" value="LITERAL_THROWS"/>
<property name="tokens" value="VARIABLE_DEF"/>
<property name="tokens" value="PARAMETER_DEF"/>
<property name="tokens" value="IMPLEMENTS_CLAUSE"/>
<property name="tokens" value="ANNOTATION_FIELD_DEF"/>
<property name="tokens" value="RECORD_DEF"/>
<property name="tokens" value="COMPACT_CTOR_DEF"/>
</module>
<module name="AnnotationUseStyle"/>
<module name="MissingDeprecated"/>
<module name="MissingOverride"/>
<module name="PackageAnnotation"/>
<module name="SuppressWarnings">
<property name="format" value="^((?!unchecked|deprecation|rawtypes|resource).)*$"/>
<message key="suppressed.warning.not.allowed"
value="The warning ''{0}'' cannot be suppressed at this location.
Only few javac warnings are allowed to suppress.
If try to suppress checkstyle/pmd/..... violation please do this in their config file.
If you try to suppress IntelliJ IDEA inspection,
please use javadoc block tag @noinspection"
/>
</module>
<module name="SuppressWarningsHolder"/>
<!-- Block Checks -->
<module name="AvoidNestedBlocks">
<property name="allowInSwitchCase" value="true"/>
</module>
<module name="EmptyBlock">
<property name="tokens" value="LITERAL_CATCH"/>
<property name="tokens" value="ARRAY_INIT"/>
<property name="tokens" value="LITERAL_DEFAULT"/>
<property name="tokens" value="LITERAL_CASE"/>
<property name="tokens" value="INSTANCE_INIT"/>
<property name="tokens" value="LITERAL_DO"/>
<property name="tokens" value="LITERAL_ELSE"/>
<property name="tokens" value="LITERAL_FINALLY"/>
<property name="tokens" value="LITERAL_FOR"/>
<property name="tokens" value="LITERAL_IF"/>
<property name="tokens" value="LITERAL_SWITCH"/>
<property name="tokens" value="LITERAL_SYNCHRONIZED"/>
<property name="tokens" value="LITERAL_TRY"/>
<property name="tokens" value="LITERAL_WHILE"/>
<property name="tokens" value="STATIC_INIT"/>
<property name="option" value="text"/>
</module>
<module name="EmptyCatchBlock"/>
<module name="LeftCurly"/>
<module name="NeedBraces"/>
<module name="NeedBraces">
<property name="tokens" value="LAMBDA"/>
<property name="allowSingleLineStatement" value="true"/>
</module>
<module name="RightCurly">
<property name="tokens" value="METHOD_DEF"/>
<property name="tokens" value="CTOR_DEF"/>
<property name="tokens" value="CLASS_DEF"/>
<property name="tokens" value="INSTANCE_INIT"/>
<property name="tokens" value="LITERAL_FOR"/>
<property name="tokens" value="STATIC_INIT"/>
<property name="tokens" value="LITERAL_WHILE"/>
<property name="tokens" value="LITERAL_CATCH"/>
<property name="tokens" value="LITERAL_ELSE"/>
<property name="tokens" value="LITERAL_FINALLY"/>
<property name="tokens" value="LITERAL_IF"/>
<property name="tokens" value="LITERAL_TRY"/>
<property name="tokens" value="ANNOTATION_DEF"/>
<property name="tokens" value="ENUM_DEF"/>
<property name="tokens" value="RECORD_DEF"/>
<property name="tokens" value="COMPACT_CTOR_DEF"/>
<property name="option" value="alone"/>
</module>
<module name="RightCurly">
<property name="tokens" value="LITERAL_DO"/>
<property name="option" value="same"/>
</module>
<module name="RightCurly">
<property name="tokens" value="INTERFACE_DEF"/>
<property name="option" value="alone_or_singleline"/>
</module>
<!-- Class Design -->
<module name="FinalClass"/>
<module name="InnerTypeLast"/>
<module name="InterfaceIsType"/>
<module name="MutableException"/>
<module name="OneTopLevelClass"/>
<module name="ThrowsCount">
<property name="max" value="4"/>
</module>
<module name="VisibilityModifier">
<property name="ignoreAnnotationCanonicalNames"
value="org.junit.Rule, org.junit.jupiter.api.io.TempDir"/>
</module>
<!-- Coding -->
<module name="ArrayTrailingComma"/>
<module name="AvoidDoubleBraceInitialization"/>
<module name="AvoidNoArgumentSuperConstructorCall"/>
<module name="CovariantEquals"/>
<module name="DeclarationOrder"/>
<module name="DefaultComesLast"/>
<module name="EmptyStatement"/>
<module name="EqualsAvoidNull"/>
<module name="EqualsHashCode"/>
<module name="ExplicitInitialization"/>
<module name="FallThrough"/>
<module name="FinalLocalVariable"/>
<module name="HiddenField">
<property name="ignoreConstructorParameter" value="true"/>
<property name="ignoreSetter" value="true"/>
<property name="setterCanReturnItsClass" value="true"/>
</module>
<module name="IllegalCatch">
<property name="illegalClassNames"
value="java.lang.RuntimeException,
java.lang.NullPointerException"/>
</module>
<module name="IllegalInstantiation">
<property name="classes"
value="org.xml.sax.SAXException, org.xml.sax.SAXParseException,
org.apache.commons.beanutils.ConversionException,
org.antlr.v4.runtime.misc.ParseCancellationException,
java.lang.StringBuffer"/>
</module>
<module name="IllegalThrows"/>
<module name="IllegalToken">
<property name="tokens" value="LABELED_STAT"/>
<property name="tokens" value="LITERAL_NATIVE"/>
<property name="tokens" value="LITERAL_VOLATILE"/>
<property name="tokens" value="LITERAL_ASSERT"/>
</module>
<module name="IllegalTokenText">
<property name="tokens" value="STRING_LITERAL"/>
<property name="format" value="^(US-ASCII|ISO-8859-1|UTF-8|UTF-16BE|UTF-16LE|UTF-16)$"/>
<property name="ignoreCase" value="true"/>
</module>
<module name="IllegalType">
<property name="illegalClassNames"
value="java.util.HashSet, HashSet, java.util.LinkedHashMap, LinkedHashMap,
java.util.TreeMap, TreeMap, java.util.HashMap, HashMap,
java.util.LinkedHashSet, LinkedHashSet, java.util.TreeSet, TreeSet,
java.lang.StringBuffer, StringBuffer"/>
</module>
<module name="InnerAssignment"/>
<module name="MagicNumber">
<property name="ignoreAnnotation" value="true"/>
</module>
<module name="MatchXpath">
<property name="query" value="//CLASS_DEF[@text!='Checker' and @text!='Main']
//LITERAL_CATCH//METHOD_CALL[.//IDENT[@text = 'printStackTrace']]/.."/>
<message key="matchxpath.match" value="Avoid using 'printStackTrace'."/>
</module>
<module name="MatchXpath">
<property name="query" value="//METHOD_DEF/MODIFIERS//
ANNOTATION[./IDENT[@text='Test']]/ANNOTATION_MEMBER_VALUE_PAIR
[./IDENT[@text='expected']]"/>
<message key="matchxpath.match" value="Avoid using 'expected' attribute in Test annotation."/>
</module>
<module name="MatchXpath">
<property name="query" value="//ANNOTATION[./IDENT[@text='Issue']]"/>
<message key="matchxpath.match" value="Avoid using @Issue annotation."/>
</module>
<module name="MatchXpath">
<property name="id" value="noUsageOfGetFileContentsMethod"/>
<property name="query" value="//CLASS_DEF[
./EXTENDS_CLAUSE[./IDENT[@text='AbstractCheck'
or @text='AbstractJavadocCheck'
or @text='AbstractSuperCheck'
or @text='AbstractClassCouplingCheck'
or @text='AbstractNameCheck'
or @text='AbstractParenPadCheck']]
and .//METHOD_CALL[.//IDENT[@text = 'getFileContents']]]"/>
<message key="matchxpath.match" value="Avoid using getFileContents method in
AbstractCheck subclasses."/>
</module>
<!-- until https://github.com/checkstyle/checkstyle/issues/5234 -->
<module name="MatchXpath">
<property name="id" value="MatchXPathBranchContains"/>
<property name="query" value="//METHOD_CALL//DOT[.//IDENT[@text = 'branchContains']]"/>
<message key="matchxpath.match"
value="Avoid using deprecated method 'DetailAst.branchContains()'."/>
</module>
<module name="MatchXpath">
<property name="id" value="singleLineCommentStartWithSpace"/>
<property name="query"
value="//SINGLE_LINE_COMMENT[./COMMENT_CONTENT[not(starts-with(@text, ' '))
and not(@text = '\n') and not(ends-with(@text, '//\n'))
and not(@text = '\r') and not(ends-with(@text, '//\r'))
and not(@text = '\r\n') and not(ends-with(@text, '//\r\n'))]]"/>
<message key="matchxpath.match" value="Single line comment text should start with space."/>
</module>
<module name="MatchXpath">
<property name="id" value="blockCommentStartWithSpace"/>
<property name="query"
value="//BLOCK_COMMENT_BEGIN[./COMMENT_CONTENT[matches(@text, '\\n+ *\*[^\\n ]\S')
or matches(@text, '^[^\* \\n]') or matches(@text, '\\r+ *\*[^\\r ]\S')
or matches(@text, '^[^\* \\r]') or matches(@text, '\\r\\n+ *\*[^\\r\\n ]\S')
or matches(@text, '^[^\* \\r\\n]') and not(starts-with(@text, '*'))]]"/>
<message key="matchxpath.match"
value="Block comment text should start with space after asterisk."/>
</module>
<module name="MatchXpath">
<property name="id" value="deprecatedWithoutSince"/>
<property name="query"
value="//ANNOTATION[./IDENT[@text='Deprecated']
and not(./ANNOTATION_MEMBER_VALUE_PAIR/IDENT[@text='since'])]"/>
<message key="matchxpath.match"
value="@Deprecated annotation should contain 'since' property."/>
</module>
<module name="MissingCtor">
<!--
we will not use that fanatic validation, extra code is not good
But this Check will exists as it was created by community demand.
-->
<property name="severity" value="ignore"/>
</module>
<module name="MissingSwitchDefault"/>
<module name="ModifiedControlVariable"/>
<module name="MultipleStringLiterals"/>
<module name="MultipleVariableDeclarations"/>
<module name="NestedForDepth">
<property name="max" value="2"/>
</module>
<module name="NestedIfDepth">
<property name="max" value="3"/>
</module>
<module name="NestedTryDepth"/>
<module name="NoArrayTrailingComma">
<!-- This Check is conflicting with ArrayTrailingComma -->
<property name="severity" value="ignore"/>
</module>
<module name="NoClone"/>
<module name="NoCodeInFile"/>
<module name="NoEnumTrailingComma">
<!-- This Check is conflicting with our vision of code
to be same as ArrayTrailingComma requires it -->
<property name="severity" value="ignore"/>
</module>
<module name="NoFinalizer"/>
<module name="OneStatementPerLine"/>
<module name="OverloadMethodsDeclarationOrder"/>
<module name="PackageDeclaration"/>
<module name="ParameterAssignment"/>
<module name="RequireThis"/>
<module name="SimplifyBooleanExpression"/>
<module name="SimplifyBooleanReturn"/>
<module name="StringLiteralEquality"/>
<module name="SuperClone"/>
<module name="SuperFinalize"/>
<module name="UnnecessaryParentheses"/>
<module name="UnnecessarySemicolonAfterOuterTypeDeclaration"/>
<module name="UnnecessarySemicolonAfterTypeMemberDeclaration"/>
<module name="UnnecessarySemicolonInEnumeration"/>
<module name="UnnecessarySemicolonInTryWithResources"/>
<module name="VariableDeclarationUsageDistance"/>
<!-- Filters -->
<module name="SuppressionCommentFilter">
<!--
Use suppressions.xml for suppressions, this is only example.
checkFormat will prevent suppression comments from being valid.
-->
<property name="checkFormat" value="IGNORETHIS"/>
<property name="offCommentFormat" value="CSOFF\: .*"/>
<property name="onCommentFormat" value="CSON\: .*"/>
</module>
<!-- Tone down the checking for test code -->
<module name="SuppressionXpathSingleFilter">
<property name="files" value="[\\/]internal[\\/].*[\\/]\w+Util\.java"/>
<property name="checks" value="IllegalCatch"/>
</module>
<module name="SuppressionXpathSingleFilter">
<property name="files" value=".*[\\/]src[\\/]test[\\/]"/>
<property name="checks" value="EmptyBlock"/>
</module>
<module name="SuppressionXpathSingleFilter">
<property name="files" value=".*[\\/]src[\\/](test|it)[\\/]"/>
<property name="checks" value="JavadocVariable"/>
</module>
<module name="SuppressionXpathSingleFilter">
<property name="files" value=".*[\\/]src[\\/](test|it)[\\/]"/>
<property name="checks" value="JavadocType"/>
</module>
<module name="SuppressionXpathSingleFilter">
<property name="files" value=".*[\\/]src[\\/](test|it)[\\/]"/>
<property name="checks" value="MagicNumber"/>
</module>
<module name="SuppressionXpathSingleFilter">
<property name="files" value=".*[\\/]src[\\/](test|it)[\\/]"/>
<property name="checks" value="AvoidStaticImport"/>
</module>
<module name="SuppressionXpathSingleFilter">
<property name="files" value=".*[\\/]src[\\/](test|it)[\\/]"/>
<property name="checks" value="WriteTag"/>
</module>
<module name="SuppressionXpathSingleFilter">
<property name="files" value=".*[\\/]src[\\/](test|it)[\\/]"/>
<property name="checks" value="MethodCount"/>
</module>
<!-- Fixing these cases will decrease code readability -->
<module name="SuppressionXpathSingleFilter">
<property name="files" value=".*[\\/]src[\\/](test|it)[\\/]"/>
<property name="checks" value="MultipleStringLiterals"/>
</module>
<module name="SuppressWithNearbyCommentFilter">
<property name="commentFormat"
value="-@cs\[(\w{8,}(\|\w{8,})*)\] \w[\(\)\-\.\'\`\,\:\;\w ]{10,}"/>
<property name="checkFormat" value="$1"/>
<property name="influenceFormat" value="3"/>
</module>
<!-- Imports -->
<module name="IllegalImport"/>
<module name="RedundantImport"/>
<module name="UnusedImports"/>
<!-- Metrics -->
<module name="BooleanExpressionComplexity">
<property name="max" value="7"/>
</module>
<module name="ClassDataAbstractionCoupling">
<!-- Default classes are also listed -->
<property name="excludedClasses"
value="boolean, byte, char, double, float, int, long, short, void,
Boolean, Byte, Character, Double, Float, Integer, Long, Short, Void,
Object, Class, String, StringBuffer, StringBuilder,
ArrayIndexOutOfBoundsException, Exception, RuntimeException,
IllegalArgumentException, IllegalStateException,
IndexOutOfBoundsException, NullPointerException, Throwable,
SecurityException, UnsupportedOperationException, List, ArrayList,
Deque, Queue, LinkedList, Set, HashSet, SortedSet, TreeSet, Map,
HashMap, SortedMap, TreeMap, DetailsAST, CheckstyleException,
UnsupportedEncodingException, BuildException, ConversionException,
FileNotFoundException, TestException"/>
<!-- TODO: lower to 7 -->
<property name="max" value="15"/>
</module>
<module name="ClassFanOutComplexity">
<!-- TODO: lower to 25 -->
<property name="max" value="40"/>
<!-- Default classes are also listed -->
<property name="excludedClasses"
value="boolean, byte, char, double, float, int, long, short,
void, Boolean, Byte, Character, Double, Float, Integer,
Long, Short, Void, Object, Class, String, StringBuffer,
StringBuilder, ArrayIndexOutOfBoundsException, Exception,
RuntimeException, IllegalArgumentException, IllegalStateException,
IndexOutOfBoundsException, NullPointerException, Throwable,
SecurityException, UnsupportedOperationException, List, ArrayList,
Deque, Queue, LinkedList, Set, HashSet, SortedSet, TreeSet, Map,
HashMap, SortedMap, TreeMap, DetailsAST, CheckstyleException,
UnsupportedEncodingException, BuildException, ConversionException,
FileNotFoundException, TestException, Log, Sets, Multimap,
TokenStreamRecognitionException, RecognitionException,
TokenStreamException, IOException, Override, Deprecated, SafeVarargs,
SuppressWarnings, FunctionalInterface, NoSuchMethodException,
InvocationTargetException, IllegalAccessException"/>
</module>
<module name="CyclomaticComplexity">
<property name="switchBlockAsSingleDecisionPoint" value="true"/>
</module>
<module name="JavaNCSS">
<!-- TODO: lower to 50 (or less) -->
<property name="methodMaximum" value="70"/>
</module>
<module name="NPathComplexity"/>
<!-- Misc -->
<module name="ArrayTypeStyle"/>
<module name="AvoidEscapedUnicodeCharacters">
<property name="allowIfAllCharactersEscaped" value="true"/>
</module>
<module name="CommentsIndentation"/>
<module name="DescendantToken"/>
<module name="FinalParameters">
<!--
we will not use that fanatic validation, extra modifiers pollute a code
it is better to use extra validation(Check) that argument is reassigned
But this Check will exists as it was created by community demand.
-->
<property name="severity" value="ignore"/>
</module>
<module name="Indentation">
<property name="basicOffset" value="4"/>
<property name="braceAdjustment" value="0"/>
<property name="caseIndent" value="4"/>
<property name="throwsIndent" value="8"/>
</module>
<module name="OuterTypeFilename"/>
<module name="TrailingComment"/>
<module name="UpperEll"/>
<!-- Modifiers -->
<module name="ClassMemberImpliedModifier">
<!-- effectively the opposite of RedundantModifier, so output must be ignored -->
<property name="severity" value="ignore"/>
</module>
<module name="InterfaceMemberImpliedModifier">
<!-- effectively the opposite of RedundantModifier, so output must be ignored -->
<property name="severity" value="ignore"/>
</module>
<module name="ModifierOrder"/>
<module name="RedundantModifier"/>
<!-- Naming Conventions -->
<module name="AbstractClassName"/>
<module name="ClassTypeParameterName"/>
<module name="RecordTypeParameterName"/>
<module name="RecordComponentName"/>
<module name="ConstantName"/>
<module name="InterfaceTypeParameterName"/>
<module name="LocalFinalVariableName"/>
<module name="LocalVariableName">
<property name="format" value="^(id)|([a-z][a-z0-9][a-zA-Z0-9]+)$"/>
<property name="allowOneCharVarInForLoop" value="true"/>
</module>
<module name="MemberName">
<property name="format" value="^(id)|([a-z][a-z0-9][a-zA-Z0-9]+)$"/>
</module>
<module name="MethodName"/>
<module name="MethodTypeParameterName"/>
<module name="PackageName"/>
<module name="ParameterName">
<property name="format" value="^(id)|([a-z][a-z0-9][a-zA-Z0-9]+)$"/>
<property name="ignoreOverridden" value="true"/>
</module>
<module name="LambdaParameterName">
<property name="format" value="^(id)|([a-z][a-z0-9][a-zA-Z0-9]+)$"/>
</module>
<module name="CatchParameterName">
<property name="format" value="^(ex|[a-z][a-z][a-zA-Z]+)$"/>
</module>
<module name="StaticVariableName">
<property name="format" value="^(id)|([a-z][a-z0-9][a-zA-Z0-9]+)$"/>
</module>
<module name="TypeName">
<property name="format" value="^[A-Z](_?[a-zA-Z0-9]+)*$"/>
</module>
<module name="PatternVariableName"/>
<module name="IllegalIdentifierName"/>
<!-- Regexp -->
<module name="Regexp">
<property name="id" value="regexpDefault"/>
</module>
<module name="RegexpSinglelineJava">
<property name="id" value="regexpSingleLineDefault"/>
</module>
<module name="RegexpSinglelineJava">
<property name="id" value="checkASCII"/>
<property name="format" value="[^\p{ASCII}]"/>
<property name="ignoreComments" value="true"/>
</module>
<!-- Size Violations -->
<module name="AnonInnerLength"/>
<module name="ExecutableStatementCount">
<!-- TODO: lower to 30 -->
<property name="max" value="55"/>
</module>
<module name="LambdaBodyLength">
<property name="max" value="25"/>
</module>
<module name="MethodCount">
<property name="maxTotal" value="34"/>
</module>
<module name="MethodLength">
<!-- TODO: lower to 150 (or less) -->
<property name="max" value="170"/>
</module>
<module name="OuterTypeNumber"/>
<module name="ParameterNumber">
<!-- TODO: lower to 10 (or less) -->
<property name="max" value="20"/>
</module>
<module name="RecordComponentNumber"/>
<!-- Whitespace -->
<module name="EmptyForInitializerPad"/>
<module name="EmptyForIteratorPad"/>
<module name="EmptyLineSeparator">
<property name="allowNoEmptyLineBetweenFields" value="true"/>
<property name="allowMultipleEmptyLinesInsideClassMembers" value="false"/>
<property name="tokens" value="VARIABLE_DEF, METHOD_DEF, CLASS_DEF, INTERFACE_DEF, ENUM_DEF, STATIC_INIT, INSTANCE_INIT, METHOD_DEF, CTOR_DEF, VARIABLE_DEF, RECORD_DEF, COMPACT_CTOR_DEF"/>
</module>
<module name="GenericWhitespace"/>
<module name="MethodParamPad"/>
<module name="NoLineWrap"/>
<module name="NoWhitespaceAfter">
<property name="tokens" value="ARRAY_INIT"/>
<property name="tokens" value="AT"/>
<property name="tokens" value="BNOT"/>
<property name="tokens" value="DEC"/>
<property name="tokens" value="DOT"/>
<property name="tokens" value="INC"/>
<property name="tokens" value="LNOT"/>
<property name="tokens" value="UNARY_MINUS"/>
<property name="tokens" value="UNARY_PLUS"/>
<property name="tokens" value="ARRAY_DECLARATOR"/>
<property name="tokens" value="INDEX_OP"/>
<property name="tokens" value="METHOD_REF"/>
</module>
<module name="NoWhitespaceBefore"/>
<module name="NoWhitespaceBeforeCaseDefaultColon"/>
<module name="NoWhitespaceBefore">
<property name="tokens" value="DOT"/>
<property name="tokens" value="METHOD_REF"/>
<property name="allowLineBreaks" value="true"/>
</module>
<module name="OperatorWrap">
<property name="tokens" value="QUESTION"/>
<property name="tokens" value="COLON"/>
<property name="tokens" value="EQUAL"/>
<property name="tokens" value="NOT_EQUAL"/>
<property name="tokens" value="DIV"/>
<property name="tokens" value="PLUS"/>
<property name="tokens" value="MINUS"/>
<property name="tokens" value="STAR"/>
<property name="tokens" value="MOD"/>
<property name="tokens" value="SR"/>
<property name="tokens" value="BSR"/>
<property name="tokens" value="GE"/>
<property name="tokens" value="GT"/>
<property name="tokens" value="SL"/>
<property name="tokens" value="LE"/>
<property name="tokens" value="LT"/>
<property name="tokens" value="BXOR"/>
<property name="tokens" value="BOR"/>
<property name="tokens" value="LOR"/>
<property name="tokens" value="BAND"/>
<property name="tokens" value="LAND"/>
<property name="tokens" value="TYPE_EXTENSION_AND"/>
<property name="tokens" value="LITERAL_INSTANCEOF"/>
<property name="tokens" value="METHOD_REF"/>
<property name="option" value="nl"/>
</module>
<module name="OperatorWrap">
<property name="tokens" value="ASSIGN"/>
<property name="tokens" value="DIV_ASSIGN"/>
<property name="tokens" value="PLUS_ASSIGN"/>
<property name="tokens" value="MINUS_ASSIGN"/>
<property name="tokens" value="STAR_ASSIGN"/>
<property name="tokens" value="MOD_ASSIGN"/>
<property name="tokens" value="SR_ASSIGN"/>
<property name="tokens" value="BSR_ASSIGN"/>
<property name="tokens" value="SL_ASSIGN"/>
<property name="tokens" value="BXOR_ASSIGN"/>
<property name="tokens" value="BOR_ASSIGN"/>
<property name="tokens" value="BAND_ASSIGN"/>
<property name="option" value="eol"/>
</module>
<module name="ParenPad"/>
<module name="SeparatorWrap">
<property name="tokens" value="DOT"/>
<property name="tokens" value="AT"/>
<property name="tokens" value="METHOD_REF"/>
<property name="option" value="nl"/>
</module>
<module name="SeparatorWrap">
<property name="tokens" value="COMMA"/>
<property name="tokens" value="RBRACK"/>
<property name="tokens" value="ARRAY_DECLARATOR"/>
<property name="tokens" value="ELLIPSIS"/>
<property name="tokens" value="SEMI"/>
<property name="option" value="EOL"/>
</module>
<module name="SingleSpaceSeparator">
<property name="validateComments" value="false"/>
</module>
<module name="TypecastParenPad"/>
<module name="WhitespaceAfter"/>
<module name="WhitespaceAround"/>
</module>
</module>