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: fixed broken url in rules Created April 28, 2017, 5:55 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 <property name="fileExtensions" value="cpp"/>
71 <property name="fileExtensions" value="h"/>
72 </module>
73
74 <module name="TreeWalker">
75
76 <!-- Checks for Javadoc comments. -->
77 <!-- See http://checkstyle.sf.net/config_javadoc.html -->
78 <!-- <module name="JavadocMethod"/> -->
79 <!-- <module name="JavadocType"/> -->
80 <!-- <module name="JavadocVariable"/> -->
81 <!-- <module name="JavadocStyle"/> -->
82
83 <!-- Checks for Naming Conventions. -->
84 <!-- See http://checkstyle.sf.net/config_naming.html -->
85 <module name="ConstantName">
86 <property name="applyToPrivate" value="false"/>
87 </module>
88 <module name="LocalFinalVariableName"/>
89 <module name="LocalVariableName"/>
90 <module name="MemberName"/>
91 <module name="MethodName"/>
92 <module name="PackageName"/>
93 <module name="ParameterName"/>
94 <module name="StaticVariableName"/>
95 <module name="TypeName"/>
96
97 <!-- Checks for imports -->
98 <!-- See http://checkstyle.sf.net/config_imports.html -->
99 <module name="AvoidStarImport"/>
100 <module name="IllegalImport"/> <!-- defaults to sun.* packages -->
101 <module name="RedundantImport"/>
102 <module name="UnusedImports">
103 <property name="processJavadoc" value="false"/>
104 </module>
105 <module name="ImportOrder">
106 <!-- Android's import guidelines: http://source.android.com/source/c ode-style.html#order-import-statements -->
107 <property name="groups" value="org.adblockplus,com,net,org,android,j ava,javax"/>
108 <property name="separated" value="true"/>
109 </module>
110
111 <!-- Checks for Size Violations. -->
112 <!-- See http://checkstyle.sf.net/config_sizes.html -->
113 <module name="LineLength">
114 <property name="max" value="100"/>
115 </module>
116 <module name="MethodLength"/>
117 <module name="ParameterNumber"/>
118
119 <!-- Checks for whitespace -->
120 <!-- See http://checkstyle.sf.net/config_whitespace.html -->
121 <module name="EmptyForIteratorPad"/>
122 <module name="GenericWhitespace"/>
123 <module name="MethodParamPad"/>
124 <module name="NoWhitespaceAfter"/>
125 <module name="NoWhitespaceBefore"/>
126 <!-- <module name="OperatorWrap"/> -->
127 <module name="ParenPad"/>
128 <module name="TypecastParenPad"/>
129 <module name="WhitespaceAfter"/>
130 <module name="WhitespaceAround"/>
131
132 <!-- Modifier Checks -->
133 <!-- See http://checkstyle.sf.net/config_modifiers.html -->
134 <module name="ModifierOrder"/>
135 <module name="RedundantModifier"/>
136
137 <!-- Checks for blocks. You know, those {}'s -->
138 <!-- See http://checkstyle.sf.net/config_blocks.html -->
139 <module name="AvoidNestedBlocks"/>
140 <module name="EmptyBlock"/>
141 <module name="LeftCurly">
142 <property name="option" value="nl"/>
143 </module>
144 <module name="NeedBraces"/>
145 <module name="RightCurly">
146 <property name="option" value="alone_or_singleline"/>
147 </module>
148
149 <!-- Checks for common coding problems -->
150 <!-- See http://checkstyle.sf.net/config_coding.html -->
151 <!--<module name="AvoidInlineConditionals"/>-->
152 <module name="EmptyStatement"/>
153 <module name="EqualsHashCode"/>
154 <!-- <module name="HiddenField"/> -->
155 <module name="IllegalInstantiation"/>
156 <module name="InnerAssignment"/>
157 <module name="MagicNumber"/>
158 <module name="MissingSwitchDefault"/>
159 <module name="SimplifyBooleanExpression"/>
160 <module name="SimplifyBooleanReturn"/>
161
162 <!-- Checks for class design -->
163 <!-- See http://checkstyle.sf.net/config_design.html -->
164 <!-- <module name="DesignForExtension"/> -->
165 <module name="FinalClass"/>
166 <module name="HideUtilityClassConstructor"/>
167 <module name="InterfaceIsType"/>
168 <!-- <module name="VisibilityModifier"/> -->
169
170 <!-- Miscellaneous other checks. -->
171 <!-- See http://checkstyle.sf.net/config_misc.html -->
172 <module name="ArrayTypeStyle"/>
173 <module name="Indentation">
174 <property name="basicOffset" value="2"/>
175 <property name="caseIndent" value="2"/>
176 <property name="throwsIndent" value="2"/>
177 <property name="lineWrappingIndentation" value="2"/>
178 </module>
179 <!-- <module name="FinalParameters"/> -->
180 <module name="TodoComment"/>
181 <module name="UpperEll"/>
182
183 </module>
184
185 </module>
OLDNEW
« no previous file with comments | « third_party/checkstyle/java/res/header.txt ('k') | third_party/checkstyle/java/rules/google_checks.xml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld