Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Side by Side Diff: third_party/checkstyle/java/rules/eyeo_checks.xml

Issue 29347926: Issue 4248 - Add codestyle check
Patch Set: changed import order - `org.adblockplus` package first Created Dec. 2, 2016, 6:19 a.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 <?xml version="1.0"?>
2 <!DOCTYPE module PUBLIC
3 "-//Puppy Crawl//DTD Check Configuration 1.3//EN"
4 "http://www.puppycrawl.com/dtds/configuration_1_3.dtd">
5
6 <!--
7
8 Checkstyle configuration that checks the sun coding conventions from:
9
10 - the Java Language Specification at
11 http://java.sun.com/docs/books/jls/second_edition/html/index.html
12
13 - the Sun Code Conventions at http://java.sun.com/docs/codeconv/
14
15 - the Javadoc guidelines at
16 http://java.sun.com/j2se/javadoc/writingdoccomments/index.html
17
18 - the JDK Api documentation http://java.sun.com/j2se/docs/api/index.html
19
20 - some best practices
21
22 Checkstyle is very configurable. Be sure to read the documentation at
23 http://checkstyle.sf.net (or in your downloaded distribution).
24
25 Most Checks are configurable, be sure to consult the documentation.
26
27 To completely disable a check, just comment it out or delete it from the file.
28
29 Finally, it is worth reading the documentation.
30
31 -->
32
33 <module name="Checker">
34 <!--
35 If you set the basedir property below, then all reported file
36 names will be relative to the specified directory. See
37 http://checkstyle.sourceforge.net/5.x/config.html#Checker
38
39 <property name="basedir" value="${basedir}"/>
40 -->
41
42 <property name="fileExtensions" value="java, properties, xml"/>
43
44 <!-- Checks whether files end with a new line. -->
45 <!-- See http://checkstyle.sf.net/config_misc.html#NewlineAtEndOfFile -->
46 <module name="NewlineAtEndOfFile"/>
47
48 <!-- Checks for Size Violations. -->
49 <!-- See http://checkstyle.sf.net/config_sizes.html -->
50 <module name="FileLength"/>
51
52 <!-- Checks for whitespace -->
53 <!-- See http://checkstyle.sf.net/config_whitespace.html -->
54 <module name="FileTabCharacter"/>
55
56 <!-- Miscellaneous other checks. -->
57 <!-- See http://checkstyle.sf.net/config_misc.html -->
58 <module name="RegexpSingleline">
59 <property name="format" value="\s+$"/>
60 <property name="minimum" value="0"/>
61 <property name="maximum" value="0"/>
62 <property name="message" value="Line has trailing spaces."/>
63 </module>
64
65 <!-- Checks for Headers -->
66 <!-- See http://checkstyle.sf.net/config_header.html -->
67 <module name="Header">
68 <property name="headerFile" value="${checkstyle.header.file}"/>
69 <property name="fileExtensions" value="java"/>
70 </module>
71
72 <module name="TreeWalker">
73
74 <!-- Checks for Javadoc comments. -->
75 <!-- See http://checkstyle.sf.net/config_javadoc.html -->
76 <!-- <module name="JavadocMethod"/> -->
77 <!-- <module name="JavadocType"/> -->
78 <!-- <module name="JavadocVariable"/> -->
79 <!-- <module name="JavadocStyle"/> -->
80
81 <!-- Checks for Naming Conventions. -->
82 <!-- See http://checkstyle.sf.net/config_naming.html -->
83 <module name="ConstantName"/>
84 <module name="LocalFinalVariableName"/>
85 <module name="LocalVariableName"/>
86 <module name="MemberName"/>
87 <module name="MethodName"/>
88 <module name="PackageName"/>
89 <module name="ParameterName"/>
90 <module name="StaticVariableName"/>
91 <module name="TypeName"/>
92
93 <!-- Checks for imports -->
94 <!-- See http://checkstyle.sf.net/config_import.html -->
95 <module name="AvoidStarImport"/>
96 <module name="IllegalImport"/> <!-- defaults to sun.* packages -->
97 <module name="RedundantImport"/>
98 <module name="UnusedImports">
99 <property name="processJavadoc" value="false"/>
100 </module>
101 <module name="ImportOrder">
102 <!-- Android's import guidelines: http://source.android.com/source/c ode-style.html#order-import-statements -->
103 <property name="groups" value="org.adblockplus,com,net,org,android,j ava,javax"/>
104 <property name="separated" value="true"/>
105 </module>
106
107 <!-- Checks for Size Violations. -->
108 <!-- See http://checkstyle.sf.net/config_sizes.html -->
109 <module name="LineLength">
110 <property name="max" value="100"/>
111 </module>
112 <module name="MethodLength"/>
113 <module name="ParameterNumber"/>
114
115 <!-- Checks for whitespace -->
116 <!-- See http://checkstyle.sf.net/config_whitespace.html -->
117 <module name="EmptyForIteratorPad"/>
118 <module name="GenericWhitespace"/>
119 <module name="MethodParamPad"/>
120 <module name="NoWhitespaceAfter"/>
121 <module name="NoWhitespaceBefore"/>
122 <!-- <module name="OperatorWrap"/> -->
123 <module name="ParenPad"/>
124 <module name="TypecastParenPad"/>
125 <module name="WhitespaceAfter"/>
126 <module name="WhitespaceAround"/>
127
128 <!-- Modifier Checks -->
129 <!-- See http://checkstyle.sf.net/config_modifiers.html -->
130 <module name="ModifierOrder"/>
131 <module name="RedundantModifier"/>
132
133 <!-- Checks for blocks. You know, those {}'s -->
134 <!-- See http://checkstyle.sf.net/config_blocks.html -->
135 <module name="AvoidNestedBlocks"/>
136 <module name="EmptyBlock"/>
137 <module name="LeftCurly">
138 <property name="option" value="nl"/>
139 </module>
140 <module name="NeedBraces"/>
141 <module name="RightCurly">
142 <property name="option" value="alone_or_singleline"/>
143 </module>
144
145 <!-- Checks for common coding problems -->
146 <!-- See http://checkstyle.sf.net/config_coding.html -->
147 <!--<module name="AvoidInlineConditionals"/>-->
148 <module name="EmptyStatement"/>
149 <module name="EqualsHashCode"/>
150 <!-- <module name="HiddenField"/> -->
151 <module name="IllegalInstantiation"/>
152 <module name="InnerAssignment"/>
153 <module name="MagicNumber"/>
154 <module name="MissingSwitchDefault"/>
155 <module name="SimplifyBooleanExpression"/>
156 <module name="SimplifyBooleanReturn"/>
157
158 <!-- Checks for class design -->
159 <!-- See http://checkstyle.sf.net/config_design.html -->
160 <!-- <module name="DesignForExtension"/> -->
161 <module name="FinalClass"/>
162 <module name="HideUtilityClassConstructor"/>
163 <module name="InterfaceIsType"/>
164 <!-- <module name="VisibilityModifier"/> -->
165
166 <!-- Miscellaneous other checks. -->
167 <!-- See http://checkstyle.sf.net/config_misc.html -->
168 <module name="ArrayTypeStyle"/>
169 <module name="Indentation">
170 <property name="basicOffset" value="2"/>
171 </module>
172 <!-- <module name="FinalParameters"/> -->
173 <module name="TodoComment"/>
174 <module name="UpperEll"/>
175
176 </module>
177
178 </module>
OLDNEW

Powered by Google App Engine
This is Rietveld