source: josm/trunk/tools/checkstyle/josm_checks.xml @ 11683

Last change on this file since 11683 was 11683, checked in by Don-vip, 2 years ago

update to CheckStyle 7.6

File size: 5.3 KB
Line 
1<?xml version="1.0" encoding="UTF-8"?>
2<!DOCTYPE module PUBLIC "-//Puppy Crawl//DTD Check Configuration 1.3//EN" "http://www.puppycrawl.com/dtds/configuration_1_3.dtd">
3
4<!--
5    This configuration file was written by the eclipse-cs plugin configuration editor
6-->
7<!--
8    Checkstyle-Configuration: JOSM
9    Description:
10JOSM Checkstyle rules
11-->
12<module name="Checker">
13  <property name="severity" value="warning"/>
14  <property name="charset" value="UTF-8"/>
15  <module name="TreeWalker">
16    <module name="BooleanExpressionComplexity">
17      <property name="max" value="6"/>
18    </module>
19    <module name="CatchParameterName">
20      <property name="format" value="^(e[1-9]?|t|ex[1-9]?|[a-z][a-z][a-zA-Z]+)$"/>
21    </module>
22    <module name="CommentsIndentation"/>
23    <module name="FileContentsHolder"/>
24    <module name="MissingDeprecated"/>
25    <module name="MissingOverride"/>
26    <module name="PackageAnnotation"/>
27    <module name="AnnotationLocation">
28      <property name="allowSamelineMultipleAnnotations" value="true"/>
29    </module>
30    <module name="AnnotationUseStyle"/>
31    <module name="JavadocStyle">
32      <property name="checkFirstSentence" value="false"/>
33      <property name="checkHtml" value="false"/>
34    </module>
35    <module name="NonEmptyAtclauseDescription"/>
36    <module name="AtclauseOrder"/>
37    <module name="AvoidStarImport"/>
38    <module name="RedundantImport"/>
39    <module name="UnusedImports">
40      <property name="processJavadoc" value="true"/>
41    </module>
42    <module name="AnonInnerLength">
43      <property name="max" value="50"/>
44    </module>
45    <module name="ExecutableStatementCount">
46      <property name="max" value="150"/>
47      <property name="tokens" value="INSTANCE_INIT,STATIC_INIT,METHOD_DEF,CTOR_DEF"/>
48    </module>
49    <module name="LineLength">
50      <property name="max" value="145"/>
51      <property name="tabWidth" value="4"/>
52    </module>
53    <module name="MethodLength">
54      <property name="max" value="300"/>
55    </module>
56    <module name="ParameterNumber">
57      <property name="max" value="10"/>
58    </module>
59    <module name="OuterTypeNumber"/>
60    <module name="MethodCount"/>
61    <module name="GenericWhitespace"/>
62    <module name="EmptyForInitializerPad"/>
63    <module name="EmptyForIteratorPad"/>
64    <module name="NoWhitespaceAfter"/>
65    <module name="NoWhitespaceBefore">
66        <property name="tokens" value="COMMA, SEMI, POST_INC, POST_DEC"/>
67    </module>
68    <module name="SingleSpaceSeparator"/>
69    <module name="MethodParamPad"/>
70    <module name="ParenPad"/>
71    <module name="TypecastParenPad">
72      <property name="tokens" value="RPAREN,TYPECAST"/>
73    </module>
74    <module name="WhitespaceAfter"/>
75    <module name="WhitespaceAround">
76      <property name="tokens" value="ASSIGN,BAND,BAND_ASSIGN,BOR,BOR_ASSIGN,BSR,BSR_ASSIGN,BXOR,BXOR_ASSIGN,COLON,DIV_ASSIGN,DO_WHILE,EQUAL,GE,GT,LAND,LCURLY,LE,LITERAL_ASSERT,LITERAL_CATCH,LITERAL_DO,LITERAL_ELSE,LITERAL_FINALLY,LITERAL_FOR,LITERAL_IF,LITERAL_RETURN,LITERAL_SYNCHRONIZED,LITERAL_TRY,LITERAL_WHILE,LOR,LT,MINUS_ASSIGN,MOD,MOD_ASSIGN,NOT_EQUAL,PLUS_ASSIGN,QUESTION,RCURLY,SL,SLIST,SL_ASSIGN,SR,SR_ASSIGN,STAR_ASSIGN,TYPE_EXTENSION_AND"/>
77      <property name="allowEmptyConstructors" value="true"/>
78      <property name="allowEmptyMethods" value="true"/>
79      <property name="allowEmptyTypes" value="true"/>
80    </module>
81    <module name="EmptyLineSeparator">
82      <property name="tokens" value="CLASS_DEF,ENUM_DEF,INTERFACE_DEF,CTOR_DEF,METHOD_DEF,STATIC_INIT"/>
83      <property name="allowNoEmptyLineBetweenFields" value="true"/>
84      <property name="allowMultipleEmptyLines" value="false"/>
85    </module>
86    <module name="ModifierOrder"/>
87    <module name="RedundantModifier"/>
88    <module name="AvoidNestedBlocks">
89      <property name="allowInSwitchCase" value="true"/>
90    </module>
91    <module name="EmptyBlock">
92      <property name="tokens" value="LITERAL_TRY,LITERAL_CATCH,LITERAL_FINALLY,LITERAL_DO,LITERAL_ELSE,LITERAL_FOR,INSTANCE_INIT,STATIC_INIT,LITERAL_SWITCH"/>
93    </module>
94    <module name="EmptyCatchBlock"/>
95    <module name="LeftCurly">
96      <property name="maxLineLength" value="140"/>
97    </module>
98    <module name="RightCurly"/>
99    <module name="NeedBraces">
100      <property name="tokens" value="LITERAL_DO,LITERAL_FOR,LITERAL_WHILE"/>
101      <property name="allowSingleLineStatement" value="true"/>
102    </module>
103    <module name="ArrayTypeStyle"/>
104    <module name="UpperEll"/>
105    <module name="OuterTypeFilename"/>
106    <module name="FinalClass"/>
107    <module name="HideUtilityClassConstructor"/>
108  </module>
109  <module name="Header">
110    <property name="header" value="// License: GPL. For details, see LICENSE file."/>
111    <property name="fileExtensions" value=".java"/>
112  </module>
113  <module name="FileLength">
114    <property name="fileExtensions" value=".java"/>
115  </module>
116  <module name="SuppressionCommentFilter">
117    <property name="offCommentFormat" value="CHECKSTYLE\.OFF\: ([\w\|]+)"/>
118    <property name="onCommentFormat" value="CHECKSTYLE\.ON\: ([\w\|]+)"/>
119    <property name="checkFormat" value="$1"/>
120  </module>
121  <module name="FileTabCharacter"/>
122  <module name="NewlineAtEndOfFile">
123    <property name="lineSeparator" value="lf"/>
124  </module>
125  <module name="SuppressionFilter">
126    <property name="file" value="${basedir}/tools/checkstyle/josm_filters.xml" default="tools/checkstyle/josm_filters.xml"/>
127    <property name="optional" value="true"/>
128  </module>
129</module>
Note: See TracBrowser for help on using the repository browser.