1
- <?xml version =" 1.0" encoding =" UTF-8" standalone =" no" ?><!--
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
+ <!--
2
7
Palantir Baseline Checkstyle configuration.
3
8
Authors: Robert Fink, Brian Worth, Merrick Zoubeiri, and many other contributors. Based in part on http://checkstyle.sourceforge.net/google_style.html
4
9
Please keep checks alphabetized with one exception: "relaxed" checks are grouped together at the bottom for easier disabling.
5
10
Check-specific comments reference documents internal to Palantir and can be safely ignored or removed.
6
- --> <!DOCTYPE module PUBLIC "-//Checkstyle//DTD Checkstyle Configuration 1.3//EN" "https://checkstyle.org/dtds/configuration_1_3.dtd">
11
+ -->
12
+
7
13
<module name =" Checker" >
8
14
<property name =" charset" value =" UTF-8" />
9
15
<property name =" severity" value =" error" />
185
191
<property name =" separated" value =" true" />
186
192
<property name =" sortStaticImportsAlphabetically" value =" true" />
187
193
</module >
188
-
194
+ <module name =" Indentation" > <!-- Java Style Guide: Block indentation: +4 spaces -->
195
+ <property name =" arrayInitIndent" value =" 8" />
196
+ <property name =" lineWrappingIndentation" value =" 8" />
197
+ </module >
189
198
<module name =" InnerAssignment" /> <!-- Java Coding Guidelines: Inner assignments: Not used -->
190
- <!-- Java Style Guide: Nonempty blocks: K & R style -->
199
+ < module name = " LeftCurly " /> <!-- Java Style Guide: Nonempty blocks: K & R style -->
191
200
<module name =" MemberName" > <!-- Java Style Guide: Non-constant field names -->
192
201
<property name =" format" value =" ^[a-z][a-zA-Z0-9]+$" />
193
202
<message key =" name.invalidPattern" value =" Member name ''{0}'' must match pattern ''{1}''." />
228
237
<message key =" name.invalidPattern" value =" Package name ''{0}'' must match pattern ''{1}''." />
229
238
</module >
230
239
<module name =" ParameterAssignment" /> <!-- Java Coding Guidelines: Final variables and parameters -->
231
- <!-- Java Style Guide: Horizontal whitespace -->
240
+ < module name = " ParenPad " /> <!-- Java Style Guide: Horizontal whitespace -->
232
241
<module name =" RedundantImport" /> <!-- Java Style Guide: No unused imports -->
233
242
<module name =" RedundantModifier" /> <!-- Java Coding Guidelines: Avoid redundant modifiers -->
234
243
<module name =" RegexpSinglelineJava" > <!-- Java Coding Guidelines: Use appropriate assertion methods -->
394
403
<module name =" UpperEll" /> <!-- Java Style Guide: Numeric Literals -->
395
404
<module name =" VisibilityModifier" /> <!-- Java Coding Guidelines: Minimize mutability -->
396
405
<module name =" WhitespaceAfter" /> <!-- Java Style Guide: Horizontal whitespace -->
397
-
406
+ <module name =" WhitespaceAround" > <!-- Java Style Guide: Horizontal whitespace -->
407
+ <property name =" allowEmptyConstructors" value =" true" />
408
+ <property name =" allowEmptyMethods" value =" true" />
409
+ <property name =" allowEmptyTypes" value =" true" />
410
+ <property name =" allowEmptyLoops" value =" true" />
411
+ <property name =" allowEmptyLambdas" value =" true" />
412
+ <property name =" ignoreEnhancedForColon" value =" false" />
413
+ <message key =" ws.notFollowed" value =" WhitespaceAround: ''{0}'' is not followed by whitespace. Empty blocks may only be represented as '{}' when not part of a multi-block statement (4.1.3)" />
414
+ <message key =" ws.notPreceded" value =" WhitespaceAround: ''{0}'' is not preceded with whitespace." />
415
+ </module >
398
416
399
417
<!-- Stricter checks begin: delete some or all of the following for faster prototyping, but please restore before pushing to production. -->
400
418
445
463
446
464
<!-- Stricter checks end -->
447
465
</module >
448
- </module >
466
+ </module >
0 commit comments