Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(8)

Side by Side Diff: third_party/WebKit/Tools/Scripts/webkitpy/pylintrc

Issue 2120083002: Enable stricter pylint checks. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Enable more pylint checks. Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright (c) 2012 Google Inc. All rights reserved. 1 # Copyright (c) 2012 Google Inc. All rights reserved.
2 # 2 #
3 # Redistribution and use in source and binary forms, with or without 3 # Redistribution and use in source and binary forms, with or without
4 # modification, are permitted provided that the following conditions are 4 # modification, are permitted provided that the following conditions are
5 # met: 5 # met:
6 # 6 #
7 # * Redistributions of source code must retain the above copyright 7 # * Redistributions of source code must retain the above copyright
8 # notice, this list of conditions and the following disclaimer. 8 # notice, this list of conditions and the following disclaimer.
9 # * Redistributions in binary form must reproduce the above 9 # * Redistributions in binary form must reproduce the above
10 # copyright notice, this list of conditions and the following disclaimer 10 # copyright notice, this list of conditions and the following disclaimer
11 # in the documentation and/or other materials provided with the 11 # in the documentation and/or other materials provided with the
12 # distribution. 12 # distribution.
13 # * Neither the name of Google Inc. nor the names of its 13 # * Neither the name of Google Inc. nor the names of its
14 # contributors may be used to endorse or promote products derived from 14 # contributors may be used to endorse or promote products derived from
15 # this software without specific prior written permission. 15 # this software without specific prior written permission.
16 # 16 #
17 # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 17 # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
18 # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 18 # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
19 # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 19 # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
20 # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 20 # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
21 # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 21 # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
22 # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 22 # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
23 # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 23 # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
24 # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 24 # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
25 # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 25 # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
26 # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 26 # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
27 # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28 28
29 # FIXME: remove this whitespace diff.
30 #
31 [MASTER] 29 [MASTER]
32 30
33 # Specify a configuration file. 31 # Specify a configuration file.
34 #rcfile= 32 #rcfile=
35 33
36 # Python code to execute, usually for sys.path manipulation such as 34 # Python code to execute, usually for sys.path manipulation such as
37 # pygtk.require(). 35 # pygtk.require().
38 #init-hook= 36 #init-hook=
39 37
40 # Profiled execution. 38 # Profiled execution.
(...skipping 15 matching lines...) Expand all
56 54
57 # Enable the message, report, category or checker with the given id(s). You can 55 # Enable the message, report, category or checker with the given id(s). You can
58 # either give multiple identifier separated by comma (,) or put this option 56 # either give multiple identifier separated by comma (,) or put this option
59 # multiple time. 57 # multiple time.
60 #enable= 58 #enable=
61 59
62 # Disable the message, report, category or checker with the given id(s). You 60 # Disable the message, report, category or checker with the given id(s). You
63 # can either give multiple identifier separated by comma (,) or put this option 61 # can either give multiple identifier separated by comma (,) or put this option
64 # multiple time (only on the command line, not in the configuration file where 62 # multiple time (only on the command line, not in the configuration file where
65 # it should appear only once). 63 # it should appear only once).
66 # CHANGED:
67 disable= 64 disable=
68 invalid-name, 65 design,
qyearsley 2016/07/03 17:20:10 design covers all of the "too-many-x" warnings.
69 missing-docstring,
70 line-too-long,
71 too-many-lines,
72 bad-inline-option,
73 locally-disabled,
74 no-self-use,
75 duplicate-code,
76 too-many-ancestors,
77 too-many-instance-attributes,
78 too-few-public-methods,
79 too-many-public-methods,
80 too-many-return-statements,
81 too-many-branches,
82 too-many-arguments,
83 too-many-locals,
84 too-many-statements,
85 abstract-class-not-used,
86 abstract-class-little-used,
87 exec-used,
88 bad-builtin,
89 star-args,
90 protected-access,
91 wildcard-import,
92 deprecated-module,
93 reimported,
94 fixme, 66 fixme,
95 global-statement, 67 global-statement,
96 unused-wildcard-import, 68 locally-disabled,
97 broad-except, 69 missing-docstring,
98 logging-not-lazy, 70 star-args,
71 wildcard-import,
99 72
100 73
101 [REPORTS] 74 [REPORTS]
102 75
103 # Set the output format. Available formats are text, parseable, colorized, msvs 76 # Set the output format. Available formats are text, parseable, colorized, msvs
104 # (visual studio) and html 77 # (visual studio) and html.
105 output-format=text 78 output-format=text
106 79
107 # Put messages in a separate file for each module / package specified on the 80 # Put messages in a separate file for each module / package specified on the
108 # command line instead of printing them on stdout. Reports (if any) will be 81 # command line instead of printing them on stdout. Reports (if any) will be
109 # written in a file name "pylint_global.[txt|html]". 82 # written in a file name "pylint_global.[txt|html]".
110 files-output=no 83 files-output=no
111 84
112 # Tells whether to display a full report or only the messages 85 # Tells whether to display a full report or only the messages.
113 # CHANGED:
114 reports=no 86 reports=no
115 87
116 # Python expression which should return a note less than 10 (10 is the highest 88 # Python expression which should return a note less than 10 (10 is the highest
117 # note). You have access to the variables errors warning, statement which 89 # note). You have access to the variables errors warning, statement which
118 # respectively contain the number of errors / warnings messages and the total 90 # respectively contain the number of errors / warnings messages and the total
119 # number of statements analyzed. This is used by the global evaluation report 91 # number of statements analyzed. This is used by the global evaluation report
120 # (RP0004). 92 # (RP0004).
121 evaluation=10.0 - ((float(5 * error + warning + refactor + convention) / stateme nt) * 10) 93 evaluation=10.0 - ((float(5 * error + warning + refactor + convention) / stateme nt) * 10)
122 94
123 # Add a comment according to your evaluation note. This is used by the global 95 # Add a comment according to your evaluation note. This is used by the global
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
173 # Ignore comments when computing similarities. 145 # Ignore comments when computing similarities.
174 ignore-comments=yes 146 ignore-comments=yes
175 147
176 # Ignore docstrings when computing similarities. 148 # Ignore docstrings when computing similarities.
177 ignore-docstrings=yes 149 ignore-docstrings=yes
178 150
179 151
180 [FORMAT] 152 [FORMAT]
181 153
182 # Maximum number of characters on a single line. 154 # Maximum number of characters on a single line.
183 max-line-length=200 155 max-line-length=132
184 156
185 # Maximum number of lines in a module 157 # Maximum number of lines in a module.
186 max-module-lines=1000 158 max-module-lines=4000
qyearsley 2016/07/03 17:20:10 Enabled line-too-long and file-too-long warnings,
187 159
188 # String used as indentation unit. This is usually " " (4 spaces) or "\t" (1 160 # String used as indentation unit. This is usually 4 spaces 1 tab.
189 # tab).
190 # CHANGED:
191 indent-string=' ' 161 indent-string=' '
192 162
193 163
194 [BASIC] 164 [BASIC]
195 165
196 # Required attributes for module, separated by a comma 166 # Required attributes for module, separated by a comma.
197 required-attributes= 167 required-attributes=
198 168
199 # List of builtins function names that should not be used, separated by a comma 169 # List of builtins function names that should not be used, separated by a comma.
200 bad-functions=map,filter,apply,input 170 bad-functions=apply
qyearsley 2016/07/03 17:20:10 The map and filter functions appear in this codeba
201 171
202 # Regular expression which should only match correct module names 172 # Regular expression which should only match correct module names.
203 module-rgx=(([a-z_][a-z0-9_]*)|([A-Z][a-zA-Z0-9]+))$ 173 module-rgx=(([a-z_][a-z0-9_]*)|([A-Z][a-zA-Z0-9]+)|([a-z-][a-z0-9-]*))$
qyearsley 2016/07/03 17:20:10 The scripts in Tools/Scripts have file names with
204 174
205 # Regular expression which should only match correct module level names 175 # Regular expression which should only match correct module level names.
206 const-rgx=(([A-Z_][A-Z0-9_]*)|(__.*__))$ 176 const-rgx=(([A-Z_][A-Z0-9_]*)|(__.*__))$
207 177
208 # Regular expression which should only match correct class names 178 # Regular expression which should only match correct class names.
209 class-rgx=[A-Z_][a-zA-Z0-9]+$ 179 class-rgx=[A-Z_][a-zA-Z0-9]+$
210 180
211 # Regular expression which should only match correct function names 181 # Regular expression which should only match correct function names.
212 function-rgx=[a-z_][a-z0-9_]{2,30}$ 182 function-rgx=[a-z_][a-z0-9_]{2,30}$
213 183
214 # Regular expression which should only match correct method names 184 # Regular expression which should only match correct method names.
215 method-rgx=[a-z_][a-z0-9_]{2,30}$ 185 method-rgx=[a-z_][a-z0-9_]{2,30}$
216 186
217 # Regular expression which should only match correct instance attribute names 187 # Regular expression which should only match correct instance attribute names.
218 attr-rgx=[a-z_][a-z0-9_]{2,30}$ 188 attr-rgx=[a-z_][a-z0-9_]{1,30}$
219 189
220 # Regular expression which should only match correct argument names 190 # Regular expression which should only match correct argument names.
221 argument-rgx=[a-z_][a-z0-9_]{2,30}$ 191 argument-rgx=[a-z_][a-z0-9_]{1,30}$
222 192
223 # Regular expression which should only match correct variable names 193 # Regular expression which should only match correct variable names.
224 variable-rgx=[a-z_][a-z0-9_]{2,30}$ 194 variable-rgx=[a-z_][a-z0-9_]{1,30}$
225 195
226 # Regular expression which should only match correct list comprehension / 196 # Regular expression which should only match correct list comprehension /
227 # generator expression variable names 197 # generator expression variable names.
228 inlinevar-rgx=[A-Za-z_][A-Za-z0-9_]*$ 198 inlinevar-rgx=[A-Za-z_][A-Za-z0-9_]*$
229 199
230 # Good variable names which should always be accepted, separated by a comma 200 # Good variable names which should always be accepted, separated by a comma.
231 good-names=i,j,k,ex,Run,_ 201 good-names=i,j,k,ex,Run,_,_log
qyearsley 2016/07/03 17:20:10 _log is used as a constant name frequently in this
232 202
233 # Bad variable names which should always be refused, separated by a comma 203 # Bad variable names which should always be refused, separated by a comma.
234 bad-names=foo,bar,baz,toto,tutu,tata 204 bad-names=foo,bar,baz,toto,tutu,tata
235 205
236 # Regular expression which should only match functions or classes name which do 206 # Regular expression which should only match functions or classes name which do
237 # not require a docstring 207 # not require a docstring.
238 no-docstring-rgx=__.*__ 208 no-docstring-rgx=__.*__
239 209
240 210
241 [DESIGN] 211 [DESIGN]
242 212
243 # Maximum number of arguments for function / method 213 # Maximum number of arguments for function / method
244 max-args=5 214 max-args=5
245 215
246 # Argument names that match this expression will be ignored. Default to name 216 # Argument names that match this expression will be ignored.
247 # with leading underscore
248 ignored-argument-names=_.* 217 ignored-argument-names=_.*
249 218
250 # Maximum number of locals for function / method body 219 # Maximum number of locals for function / method body.
mithro 2016/07/21 05:37:54 I don't think we should change all the comment lin
qyearsley 2016/07/21 16:04:51 Comment changes now removed from this CL
251 max-locals=15 220 max-locals=15
252 221
253 # Maximum number of return / yield for function / method body 222 # Maximum number of return / yield for function / method body.
254 max-returns=6 223 max-returns=6
255 224
256 # Maximum number of branch for function / method body 225 # Maximum number of branch for function / method body.
257 max-branchs=12 226 max-branchs=12
258 227
259 # Maximum number of statements in function / method body 228 # Maximum number of statements in function / method body.
260 max-statements=50 229 max-statements=50
261 230
262 # Maximum number of parents for a class (see R0901). 231 # Maximum number of parents for a class (see R0901).
263 max-parents=7 232 max-parents=7
264 233
265 # Maximum number of attributes for a class (see R0902). 234 # Maximum number of attributes for a class (see R0902).
266 max-attributes=7 235 max-attributes=7
267 236
268 # Minimum number of public methods for a class (see R0903). 237 # Minimum number of public methods for a class (see R0903).
269 min-public-methods=2 238 min-public-methods=2
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
301 # Create a graph of internal dependencies in the given file (report RP0402 must 270 # Create a graph of internal dependencies in the given file (report RP0402 must
302 # not be disabled) 271 # not be disabled)
303 int-import-graph= 272 int-import-graph=
304 273
305 274
306 [EXCEPTIONS] 275 [EXCEPTIONS]
307 276
308 # Exceptions that will emit a warning when being caught. Defaults to 277 # Exceptions that will emit a warning when being caught. Defaults to
309 # "Exception" 278 # "Exception"
310 overgeneral-exceptions=Exception 279 overgeneral-exceptions=Exception
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698