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

Side by Side Diff: tools/telemetry/third_party/coverage/pylintrc

Issue 1366913004: Add coverage Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 2 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
OLDNEW
1 # Licensed under the Apache License: http://www.apache.org/licenses/LICENSE-2.0
2 # For details: https://bitbucket.org/ned/coveragepy/src/default/NOTICE.txt
3
1 # lint Python modules using external checkers. 4 # lint Python modules using external checkers.
2 # 5 #
3 # This is the main checker controlling the other ones and the reports 6 # This is the main checker controling the other ones and the reports
4 # generation. It is itself both a raw checker and an astng checker in order 7 # generation. It is itself both a raw checker and an astng checker in order
5 # to: 8 # to:
6 # * handle message activation / deactivation at the module level 9 # * handle message activation / deactivation at the module level
7 # * handle some basic but necessary stats'data (number of classes, methods...) 10 # * handle some basic but necessary stats'data (number of classes, methods...)
8 # 11 #
9 [MASTER] 12 [MASTER]
10 13
11
12 # Specify a configuration file. 14 # Specify a configuration file.
13 #rcfile= 15 #rcfile=
14 16
17 # Python code to execute, usually for sys.path manipulation such as
18 # pygtk.require().
19 #init-hook=
20
15 # Profiled execution. 21 # Profiled execution.
16 profile=no 22 profile=no
17 23
18 # Add <file or directory> to the black list. It should be a base name, not a 24 # Add <file or directory> to the black list. It should be a base name, not a
19 # path. You may set this option multiple times. 25 # path. You may set this option multiple times.
20 ignore=.svn 26 ignore=
21 27
22 # Pickle collected data for later comparisons. 28 # Pickle collected data for later comparisons.
23 persistent=yes 29 persistent=no
24 30
25 # Set the cache size for astng objects. 31 # Set the cache size for astng objects.
26 cache-size=500 32 cache-size=500
27 33
28 # List of plugins (as comma separated values of python modules names) to load, 34 # List of plugins (as comma separated values of python modules names) to load,
29 # usually to register additional checkers. 35 # usually to register additional checkers.
30 load-plugins= 36 load-plugins=
31 37
32 38
33 [MESSAGES CONTROL] 39 [MESSAGES CONTROL]
34 40
35 # Enable only checker(s) with the given id(s). This option conflict with the 41 # Enable only checker(s) with the given id(s). This option conflicts with the
36 # disable-checker option 42 # disable-checker option
37 #enable-checker= 43 #enable-checker=
38 44
39 # Enable all checker(s) except those with the given id(s). This option conflict 45 # Enable all checker(s) except those with the given id(s). This option
40 # with the disable-checker option 46 # conflicts with the enable-checker option
41 #disable-checker= 47 #disable-checker=
42 48
43 # Enable all messages in the listed categories. 49 # Enable all messages in the listed categories.
44 #enable-msg-cat= 50 #enable-msg-cat=
45 51
46 # Disable all messages in the listed categories. 52 # Disable all messages in the listed categories.
47 #disable-msg-cat= 53 #disable-msg-cat=
48 54
49 # Enable the message(s) with the given id(s). 55 # Enable the message(s) with the given id(s).
50 #enable-msg= 56 enable=
57 # I0021: Useless suppression
58 I0021
51 59
52 # Disable the message(s) with the given id(s). 60 # Disable the message(s) with the given id(s).
53 # disable-msg=C0323,W0142,C0301,C0103,C0111,E0213,C0302,C0203,W0703,R0201 61 disable=
54 disable-msg=C0301,C0111,C0103,R0201,W0702,C0324 62 spelling,
63 # Messages that are just silly:
64 # I0011:106: Locally disabling E1101
65 # W0122: 30:run_python_file: Use of the exec statement
66 # W0142: 31:call_singleton_method: Used * or ** magic
67 # W0232: 6:AnyOldObject: Class has no __init__ method
68 # C0323:311:coverage.report: Operator not followed by a space
69 # C0324: 15: Comma not followed by a space
70 # W0603: 28:call_singleton_method: Using the global statement
71 # W0703:133:CoverageData._read_file: Catch "Exception"
72 I0011,W0122,W0142,W0232,C0323,C0324,W0603,W0703,
73 # Messages that may be silly:
74 # R0201: 42:Tracer.stop: Method could be a function
75 # E1103: 26:RunTests.test_run_python_file: Instance of 'file' has no 'getvalue ' member (but some types could not be inferred)
76 R0201,E1103,
77 # formatting stuff
78 superfluous-parens,bad-continuation,
79 # Messages that are noisy for now, eventually maybe we'll turn them on:
80 # C0103:256:coverage.morf_filename: Invalid name "f" (should match [a-z_][a-z0 -9_]{2,30}$)
81 # W0212: 86:Reporter.report_files: Access to a protected member _analyze of a client class
82 C0103,W0212,
83 duplicate-code,
84 cyclic-import
85
86 msg-template={path}:{line}: {msg} ({symbol})
55 87
56 [REPORTS] 88 [REPORTS]
57 89
58 # set the output format. Available formats are text, parseable, colorized and 90 # set the output format. Available formats are text, parseable, colorized, msvs
59 # html 91 # (visual studio) and html
60 output-format=colorized 92 output-format=text
61
62 # Include message's id in output
63 include-ids=yes
64 93
65 # Put messages in a separate file for each module / package specified on the 94 # Put messages in a separate file for each module / package specified on the
66 # command line instead of printing them on stdout. Reports (if any) will be 95 # command line instead of printing them on stdout. Reports (if any) will be
67 # written in a file name "pylint_global.[txt|html]". 96 # written in a file name "pylint_global.[txt|html]".
68 files-output=no 97 files-output=no
69 98
70 # Tells wether to display a full report or only the messages 99 # Tells wether to display a full report or only the messages
71 reports=yes 100 reports=no
72 101
73 # Python expression which should return a note less than 10 (10 is the highest 102 # Python expression which should return a note less than 10 (10 is the highest
74 # note).You have access to the variables errors warning, statement which 103 # note).You have access to the variables errors warning, statement which
75 # respectivly contain the number of errors / warnings messages and the total 104 # respectivly contain the number of errors / warnings messages and the total
76 # number of statements analyzed. This is used by the global evaluation report 105 # number of statements analyzed. This is used by the global evaluation report
77 # (R0004). 106 # (R0004).
78 evaluation=10.0 - ((float(5 * error + warning + refactor + convention) / stateme nt) * 10) 107 evaluation=10.0 - ((float(5 * error + warning + refactor + convention) / stateme nt) * 10)
79 108
80 # Add a comment according to your evaluation note. This is used by the global 109 # Add a comment according to your evaluation note. This is used by the global
81 # evaluation report (R0004). 110 # evaluation report (R0004).
82 comment=no 111 comment=no
83 112
84 # Enable the report(s) with the given id(s). 113 # Enable the report(s) with the given id(s).
85 #enable-report= 114 #enable-report=
86 115
87 # Disable the report(s) with the given id(s). 116 # Disable the report(s) with the given id(s).
88 #disable-report= 117 #disable-report=
89 118
90 # checks for
91 # * unused variables / imports
92 # * undefined variables
93 # * redefinition of variable from builtins or from an outer scope
94 # * use of variable before assigment
95 #
96 [VARIABLES]
97
98 # Tells wether we should check for unused import in __init__ files.
99 init-import=yes
100
101 # A regular expression matching names used for dummy variables (i.e. not used).
102 dummy-variables-rgx=_|dummy
103
104 # List of additional names supposed to be defined in builtins. Remember that
105 # you should avoid to define new builtins when possible.
106 additional-builtins=
107
108
109 # try to find bugs in the code using type inference
110 #
111 [TYPECHECK]
112
113 # Tells wether missing members accessed in mixin class should be ignored. A
114 # mixin class is detected if its name ends with "mixin" (case insensitive).
115 ignore-mixin-members=yes
116
117 # When zope mode is activated, consider the acquired-members option to ignore
118 # access to some undefined attributes.
119 zope=no
120
121 # List of members which are usually get through zope's acquisition mecanism and
122 # so shouldn't trigger E0201 when accessed (need zope=yes to be considered).
123 acquired-members=REQUEST,acl_users,aq_parent
124
125 119
126 # checks for : 120 # checks for :
127 # * doc strings 121 # * doc strings
128 # * modules / classes / functions / methods / arguments / variables name 122 # * modules / classes / functions / methods / arguments / variables name
129 # * number of arguments, local variables, branches, returns and statements in 123 # * number of arguments, local variables, branchs, returns and statements in
130 # functions, methods 124 # functions, methods
131 # * required module attributes 125 # * required module attributes
132 # * dangerous default values as arguments 126 # * dangerous default values as arguments
133 # * redefinition of function / method / class 127 # * redefinition of function / method / class
134 # * uses of the global statement 128 # * uses of the global statement
135 # 129 #
136 [BASIC] 130 [BASIC]
137 131
138 # Required attributes for module, separated by a comma 132 # Required attributes for module, separated by a comma
139 required-attributes= 133 required-attributes=
140 134
141 # Regular expression which should only match functions or classes name which do 135 # Regular expression which should only match functions or classes name which do
142 # not require a docstring 136 # not require a docstring
143 no-docstring-rgx=__.*__ 137 no-docstring-rgx=__.*__|test[A-Z_].*|setUp|tearDown
144 138
145 # Regular expression which should only match correct module names 139 # Regular expression which should only match correct module names
146 module-rgx=(([a-z_][a-z0-9_]*)|([A-Z][a-zA-Z0-9]+))$ 140 module-rgx=(([a-z_][a-z0-9_]*)|([A-Z][a-zA-Z0-9]+))$
147 141
148 # Regular expression which should only match correct module level names 142 # Regular expression which should only match correct module level names
149 const-rgx=(([A-Z_][A-Z1-9_]*)|(__.*__))$ 143 const-rgx=(([A-Z_][A-Z0-9_]*)|(__.*__))$
150 144
151 # Regular expression which should only match correct class names 145 # Regular expression which should only match correct class names
152 class-rgx=[A-Z_][a-zA-Z0-9]+$ 146 class-rgx=[A-Z_][a-zA-Z0-9]+$
153 147
154 # Regular expression which should only match correct function names 148 # Regular expression which should only match correct function names
155 function-rgx=[a-z_][a-z0-9_]{2,30}$ 149 function-rgx=[a-z_][a-z0-9_]{2,30}$
156 150
157 # Regular expression which should only match correct method names 151 # Regular expression which should only match correct method names
158 method-rgx=[a-z_][a-z0-9_]{2,30}$ 152 method-rgx=[a-z_][a-z0-9_]{2,30}$|setUp|tearDown|test_.*
159 153
160 # Regular expression which should only match correct instance attribute names 154 # Regular expression which should only match correct instance attribute names
161 attr-rgx=[a-z_][a-z0-9_]{2,30}$ 155 attr-rgx=[a-z_][a-z0-9_]{2,30}$
162 156
163 # Regular expression which should only match correct argument names 157 # Regular expression which should only match correct argument names
164 argument-rgx=[a-z_][a-z0-9_]{2,30}$ 158 argument-rgx=[a-z_][a-z0-9_]{2,30}$
165 159
166 # Regular expression which should only match correct variable names 160 # Regular expression which should only match correct variable names
167 variable-rgx=[a-z_][a-z0-9_]{2,30}$ 161 variable-rgx=[a-z_][a-z0-9_]{2,30}$
168 162
169 # Regular expression which should only match correct list comprehension / 163 # Regular expression which should only match correct list comprehension /
170 # generator expression variable names 164 # generator expression variable names
171 inlinevar-rgx=[A-Za-z_][A-Za-z0-9_]*$ 165 inlinevar-rgx=[A-Za-z_][A-Za-z0-9_]*$
172 166
173 # Good variable names which should always be accepted, separated by a comma 167 # Good variable names which should always be accepted, separated by a comma
174 good-names=i,j,k,ex,Run,_ 168 good-names=i,j,k,ex,Run,_
175 169
176 # Bad variable names which should always be refused, separated by a comma 170 # Bad variable names which should always be refused, separated by a comma
177 bad-names=foo,bar,baz,toto,tutu,tata 171 bad-names=foo,bar,baz,toto,tutu,tata
178 172
179 # List of builtins function names that should not be used, separated by a comma 173 # List of builtins function names that should not be used, separated by a comma
180 bad-functions=apply,input 174 bad-functions=
175
176
177 # try to find bugs in the code using type inference
178 #
179 [TYPECHECK]
180
181 # Tells wether missing members accessed in mixin class should be ignored. A
182 # mixin class is detected if its name ends with "mixin" (case insensitive).
183 ignore-mixin-members=yes
184
185 # List of classes names for which member attributes should not be checked
186 # (useful for classes with attributes dynamicaly set).
187 ignored-classes=SQLObject
188
189 # When zope mode is activated, consider the acquired-members option to ignore
190 # access to some undefined attributes.
191 zope=no
192
193 # List of members which are usually get through zope's acquisition mecanism and
194 # so shouldn't trigger E0201 when accessed (need zope=yes to be considered).
195 acquired-members=REQUEST,acl_users,aq_parent
196
197
198 # checks for
199 # * unused variables / imports
200 # * undefined variables
201 # * redefinition of variable from builtins or from an outer scope
202 # * use of variable before assigment
203 #
204 [VARIABLES]
205
206 # Tells wether we should check for unused import in __init__ files.
207 init-import=no
208
209 # A regular expression matching names used for dummy variables (i.e. not used).
210 dummy-variables-rgx=_|dummy|unused|.*_unused
211
212 # List of additional names supposed to be defined in builtins. Remember that
213 # you should avoid to define new builtins when possible.
214 additional-builtins=
215
216
217 # checks for :
218 # * methods without self as first argument
219 # * overridden methods signature
220 # * access only to existant members via self
221 # * attributes not defined in the __init__ method
222 # * supported interfaces implementation
223 # * unreachable code
224 #
225 [CLASSES]
226
227 # List of interface methods to ignore, separated by a comma. This is used for
228 # instance to not check methods defines in Zope's Interface base class.
229 ignore-iface-methods=isImplementedBy,deferred,extends,names,namesAndDescriptions ,queryDescriptionFor,getBases,getDescriptionFor,getDoc,getName,getTaggedValue,ge tTaggedValueTags,isEqualOrExtendedBy,setTaggedValue,isImplementedByInstancesOf,a daptWith,is_implemented_by
230
231 # List of method names used to declare (i.e. assign) instance attributes.
232 defining-attr-methods=__init__,__new__,setUp,reset
181 233
182 234
183 # checks for sign of poor/misdesign: 235 # checks for sign of poor/misdesign:
184 # * number of methods, attributes, local variables... 236 # * number of methods, attributes, local variables...
185 # * size, complexity of functions, methods 237 # * size, complexity of functions, methods
186 # 238 #
187 [DESIGN] 239 [DESIGN]
188 240
189 # Maximum number of arguments for function / method 241 # Maximum number of arguments for function / method
190 max-args=12 242 max-args=15
191 243
192 # Maximum number of locals for function / method body 244 # Maximum number of locals for function / method body
193 max-locals=30 245 max-locals=50
194 246
195 # Maximum number of return / yield for function / method body 247 # Maximum number of return / yield for function / method body
196 max-returns=12 248 max-returns=20
197 249
198 # Maximum number of branch for function / method body 250 # Maximum number of branch for function / method body
199 max-branchs=30 251 max-branches=50
200 252
201 # Maximum number of statements in function / method body 253 # Maximum number of statements in function / method body
202 max-statements=60 254 max-statements=150
203 255
204 # Maximum number of parents for a class (see R0901). 256 # Maximum number of parents for a class (see R0901).
205 max-parents=7 257 max-parents=12
206 258
207 # Maximum number of attributes for a class (see R0902). 259 # Maximum number of attributes for a class (see R0902).
208 max-attributes=20 260 max-attributes=40
209 261
210 # Minimum number of public methods for a class (see R0903). 262 # Minimum number of public methods for a class (see R0903).
211 min-public-methods=0 263 min-public-methods=0
212 264
213 # Maximum number of public methods for a class (see R0904). 265 # Maximum number of public methods for a class (see R0904).
214 max-public-methods=20 266 max-public-methods=500
215 267
216 268
217 # checks for 269 # checks for
218 # * external modules dependencies 270 # * external modules dependencies
219 # * relative / wildcard imports 271 # * relative / wildcard imports
220 # * cyclic imports 272 # * cyclic imports
221 # * uses of deprecated modules 273 # * uses of deprecated modules
222 # 274 #
223 [IMPORTS] 275 [IMPORTS]
224 276
225 # Deprecated modules which should not be used, separated by a comma 277 # Deprecated modules which should not be used, separated by a comma
226 deprecated-modules=regsub,string,TERMIOS,Bastion,rexec 278 deprecated-modules=regsub,string,TERMIOS,Bastion,rexec
227 279
228 # Create a graph of every (i.e. internal and external) dependencies in the 280 # Create a graph of every (i.e. internal and external) dependencies in the
229 # given file (report R0402 must not be disabled) 281 # given file (report R0402 must not be disabled)
230 import-graph= 282 import-graph=
231 283
232 # Create a graph of external dependencies in the given file (report R0402 must 284 # Create a graph of external dependencies in the given file (report R0402 must
233 # not be disabled) 285 # not be disabled)
234 ext-import-graph= 286 ext-import-graph=
235 287
236 # Create a graph of internal dependencies in the given file (report R0402 must 288 # Create a graph of internal dependencies in the given file (report R0402 must
237 # not be disabled) 289 # not be disabled)
238 int-import-graph= 290 int-import-graph=
239 291
240 292
241 # checks for : 293 # checks for :
242 # * methods without self as first argument 294 # * unauthorized constructions
243 # * overridden methods signature 295 # * strict indentation
244 # * access only to existant members via self 296 # * line length
245 # * attributes not defined in the __init__ method 297 # * use of <> instead of !=
246 # * supported interfaces implementation
247 # * unreachable code
248 # 298 #
249 [CLASSES] 299 [FORMAT]
250 300
251 # List of interface methods to ignore, separated by a comma. This is used for 301 # Maximum number of characters on a single line.
252 # instance to not check methods defines in Zope's Interface base class. 302 max-line-length=100
253 # ignore-iface-methods=isImplementedBy,deferred,extends,names,namesAndDescriptio ns,queryDescriptionFor,getBases,getDescriptionFor,getDoc,getName,getTaggedValue, getTaggedValueTags,isEqualOrExtendedBy,setTaggedValue,isImplementedByInstancesOf ,adaptWith,is_implemented_by
254 303
255 # List of method names used to declare (i.e. assign) instance attributes. 304 # Maximum number of lines in a module
256 defining-attr-methods=__init__,__new__,setUp 305 max-module-lines=10000
306
307 # String used as indentation unit. This is usually " " (4 spaces) or "\t" (1
308 # tab).
309 indent-string=' '
310
311
312 # checks for:
313 # * warning notes in the code like FIXME, XXX
314 # * PEP 263: source code with non ascii character but no encoding declaration
315 #
316 [MISCELLANEOUS]
317
318 # List of note tags to take in consideration, separated by a comma.
319 notes=FIXME,XXX,TODO
257 320
258 321
259 # checks for similarities and duplicated code. This computation may be 322 # checks for similarities and duplicated code. This computation may be
260 # memory / CPU intensive, so you should disable it if you experiments some 323 # memory / CPU intensive, so you should disable it if you experiments some
261 # problems. 324 # problems.
262 # 325 #
263 [SIMILARITIES] 326 [SIMILARITIES]
264 327
265 # Minimum lines number of a similarity. 328 # Minimum lines number of a similarity.
266 min-similarity-lines=5 329 min-similarity-lines=4
267 330
268 # Ignore comments when computing similarities. 331 # Ignore comments when computing similarities.
269 ignore-comments=yes 332 ignore-comments=yes
270 333
271 # Ignore docstrings when computing similarities. 334 # Ignore docstrings when computing similarities.
272 ignore-docstrings=yes 335 ignore-docstrings=yes
273 336
337 #
338 # SPELLING
339 #
274 340
275 # checks for: 341 spelling-dict=en_US
276 # * warning notes in the code like FIXME, XXX 342 # pylint doesn't strip the words, so insert a dummy x at the beginning to make
277 # * PEP 263: source code with non ascii character but no encoding declaration 343 # the other words work properly.
278 # 344 # https://bitbucket.org/logilab/pylint/issue/398/spelling-words-need-to-be-strip ped-or-the
279 [MISCELLANEOUS] 345 spelling-private-dict-file=doc/dict.txt
280
281 # List of note tags to take in consideration, separated by a comma.
282 notes=FIXME,XXX,TODO,BUG:
283
284
285 # checks for :
286 # * unauthorized constructions
287 # * strict indentation
288 # * line length
289 # * use of <> instead of !=
290 #
291 [FORMAT]
292
293 # Maximum number of characters on a single line.
294 max-line-length=80
295
296 # Maximum number of lines in a module
297 max-module-lines=1000
298
299 # String used as indentation unit. This is usually " " (4 spaces) or "\t" (1
300 # tab).
301 indent-string=' '
OLDNEW
« no previous file with comments | « tools/telemetry/third_party/coverage/metacov.ini ('k') | tools/telemetry/third_party/coverage/requirements/dev.pip » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698