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

Side by Side Diff: third_party/checkstyle/java/rules/mozilla_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.2//EN"
4 "http://www.puppycrawl.com/dtds/configuration_1_2.dtd">
5
6 <!--
7
8 https://github.com/mozilla-services/mozilla-style/blob/master/java/checkstyl e.xml
9
10 This file contains a Checkstyle configuration that checks for compliance wit h
11 Mozilla's Java style conventions.
12
13 The file defines the modules and properties in alpabetical order. Each prope rty
14 should be documented with what it does.
15
16 -->
17
18 <module name="Checker">
19 <module name="TreeWalker">
20
21 <!-- Annotations. http://checkstyle.sourceforge.net/config_annotation.html - ->
22 <module name="AnnotationUseStyle"/>
23 <module name="MissingDeprecated"/>
24 <module name="MissingOverride"/>
25 <module name="SuppressWarnings"/>
26
27 <!-- Block checks. See http://checkstyle.sourceforge.net/config_blocks.html -->
28 <module name="AvoidNestedBlocks"/>
29 <module name="EmptyBlock"/>
30 <module name="LeftCurly"/>
31 <module name="NeedBraces"/>
32 <module name="RightCurly"/>
33
34 <!-- Class Design. http://checkstyle.sourceforge.net/config_design.html -->
35 <module name="DesignForExtension"/>
36 <module name="FinalClass"/>
37 <module name="HideUtilityClassConstructor"/>
38 <module name="InterfaceIsType"/>
39 <module name="InnerTypeLast"/>
40 <module name="MutableException"/>
41 <module name="VisibilityModifier"/>
42
43 <!-- Common coding problems. See http://checkstyle.sf.net/config_coding.html -->
44 <module name="ArrayTrailingComma"/>
45 <module name="CovariantEquals"/>
46 <module name="DeclarationOrder"/>
47 <module name="DefaultComesLast"/>
48 <module name="EmptyStatement"/>
49 <module name="EqualsHashCode"/>
50 <module name="EqualsAvoidNull"/>
51 <module name="ExplicitInitialization"/>
52 <module name="HiddenField"/>
53 <module name="IllegalCatch"/>
54 <module name="IllegalInstantiation"/>
55 <module name="IllegalThrows"/>
56 <module name="IllegalToken"/>
57 <module name="IllegalType"/>
58 <module name="InnerAssignment"/>
59 <module name="MagicNumber"/>
60 <module name="MissingCtor"/>
61 <module name="MissingSwitchDefault"/>
62 <module name="ModifiedControlVariable"/>
63 <module name="MultipleStringLiterals"/>
64 <module name="MultipleVariableDeclarations"/>
65 <module name="NestedForDepth"/>
66 <module name="NoClone"/>
67 <module name="NoFinalizer"/>
68 <module name="OneStatementPerLine"/>
69 <module name="PackageDeclaration"/>
70 <module name="ParameterAssignment"/>
71 <module name="SimplifyBooleanExpression"/>
72 <module name="SimplifyBooleanReturn"/>
73 <module name="StringLiteralEquality"/>
74 <module name="UnnecessaryParentheses"/>
75
76 <!-- Duplicate code. http://checkstyle.sourceforge.net/config_duplicates.htm l -->
77
78 <!-- Header. See http://checkstyle.sourceforge.net/config_header.html -->
79 <!-- TODO detect MPL 2.0 in all files. -->
80
81 <!-- Imports. See http://checkstyle.sf.net/config_import.html -->
82 <module name="AvoidStarImport"/>
83 <module name="IllegalImport"/>
84 <module name="ImportOrder">
85 <!-- Android's import guidelines: http://source.android.com/source/code-st yle.html#order-import-statements -->
86 <property name="groups" value="android,ch,com,net,org,java,javax"/>
87 <property name="separated" value="true"/>
88 </module>
89 <module name="AvoidStaticImport"/>
90 <module name="RedundantImport"/>
91 <module name="UnusedImports"/>
92
93 <!-- Javadoc. See http://checkstyle.sourceforge.net/config_javadoc.html -->
94 <module name="JavadocMethod"/>
95 <module name="JavadocStyle"/>
96 <module name="JavadocType"/>
97 <module name="JavadocVariable"/>
98
99 <!-- Metrics. See http://checkstyle.sourceforge.net/config_metrics.html -->
100
101 <!-- Miscellaneous. See http://checkstyle.sourceforge.net/config_misc.html - ->
102 <module name="ArrayTypeStyle"/>
103 <module name="Indentation"/>
104 <module name="OuterTypeFilename"/>
105 <module name="TodoComment">
106 <property name="format" value="FIX ?ME|TO-?DO|XXX"/>
107 </module>
108 <module name="UpperEll"/>
109
110 <!-- Modifiers. See http://checkstyle.sourceforge.net/config_modifier.html - ->
111 <module name="ModifierOrder"/>
112 <module name="RedundantModifier"/>
113
114 <!-- Naming Conventions. See http://checkstyle.sourceforge.net/config_naming .html -->
115 <module name="ConstantName"/>
116 <module name="LocalFinalVariableName"/>
117 <module name="LocalVariableName"/>
118 <module name="MemberName">
119 <!-- We require member names to be prefixed with 'm'. -->
120 <property name="format" value="^m[A-Z][a-zA-Z0-9]*$" />
121 </module>
122 <module name="MethodName"/>
123 <module name="PackageName"/>
124 <module name="ParameterName"/>
125 <module name="StaticVariableName">
126 <!-- We require static member names to be prefixed with 's'. -->
127 <property name="format" value="^s[A-Z][a-zA-Z0-9]*$" />
128 </module>
129 <module name="TypeName"/>
130
131 <!-- Regular expressions. See http://checkstyle.sourceforge.net/config_regex p.html -->
132
133 <!-- Size violations. See http://checkstyle.sourceforge.net/config_sizes.htm l -->
134 <module name="AnonInnerLength"/>
135 <module name="LineLength">
136 <property name="max" value="100" />
137 </module>
138 <module name="MethodCount"/>
139 <module name="MethodLength"/>
140 <module name="OuterTypeNumber"/>
141 <module name="ParameterNumber"/>
142
143 <!-- Whitespace. See http://checkstyle.sourceforge.net/config_whitespace.htm l -->
144 <module name="EmptyForInitializerPad"/>
145 <module name="EmptyForIteratorPad"/>
146 <module name="GenericWhitespace"/>
147 <module name="MethodParamPad"/>
148 <module name="NoWhitespaceAfter"/>
149 <module name="NoWhitespaceBefore"/>
150 <module name="OperatorWrap"/>
151 <module name="ParenPad"/>
152 <module name="TypecastParenPad"/>
153 <module name="WhitespaceAfter"/>
154 <module name="WhitespaceAround"/>
155
156 </module>
157
158 <module name="FileLength"/>
159
160 <module name="FileTabCharacter">
161 <property name="eachLine" value="true"/>
162 </module>
163
164 <module name="NewlineAtEndOfFile"/>
165
166 <module name="RegexpSingleline">
167 <!-- Check for trailing whitespace. -->
168 <property name="format" value="\s+$"/>
169 <property name="message" value="Line has trailing spaces."/>
170 </module>
171
172 </module>
OLDNEW
« no previous file with comments | « third_party/checkstyle/java/rules/google_checks.xml ('k') | third_party/checkstyle/java/rules/sun_checks.xml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld