1 # Copyright (c) 2012 Google Inc. All rights reserved.
3 # Redistribution and use in source and binary forms, with or without
4 # modification, are permitted provided that the following conditions are
7 # * Redistributions of source code must retain the above copyright
8 # notice, this list of conditions and the following disclaimer.
9 # * Redistributions in binary form must reproduce the above
10 # copyright notice, this list of conditions and the following disclaimer
11 # in the documentation and/or other materials provided with the
13 # * Neither the name of Google Inc. nor the names of its
14 # contributors may be used to endorse or promote products derived from
15 # this software without specific prior written permission.
17 # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
18 # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
19 # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
20 # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
21 # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
22 # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
23 # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
24 # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
25 # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
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.
31 # Specify a configuration file.
34 # Python code to execute, usually for sys.path manipulation such as
41 # Add files or directories to the blacklist. They should be base names, not
45 # Pickle collected data for later comparisons.
48 # List of plugins (as comma separated values of python modules names) to load,
49 # usually to register additional checkers.
55 # Enable the message, report, category or checker with the given id(s). You can
56 # either give multiple identifier separated by comma (,) or put this option
60 # Disable the message, report, category or checker with the given id(s). You
61 # can either give multiple identifier separated by comma (,) or put this option
62 # multiple time (only on the command line, not in the configuration file where
63 # it should appear only once).
65 # C0103: Invalid name ""
66 # C0111: Missing docstring
67 # C0302: Too many lines in module (N)
68 # I0010: Unable to consider inline option ''
69 # I0011: Locally disabling WNNNN
71 # R0201: Method could be a function
72 # R0801: Similar lines in N files
73 # R0901: Too many ancestors (8/7)
74 # R0902: Too many instance attributes (N/7)
75 # R0903: Too few public methods (N/2)
76 # R0904: Too many public methods (N/20)
77 # R0911: Too many return statements (N/6)
78 # R0912: Too many branches (N/12)
79 # R0913: Too many arguments (N/5)
80 # R0914: Too many local variables (N/15)
81 # R0915: Too many statements (N/50)
82 # R0921: Abstract class not referenced
83 # R0922: Abstract class is only referenced 1 times
84 # W0122: Use of the exec statement
85 # W0141: Used builtin function ''
86 # W0212: Access to a protected member X of a client class
87 # W0142: Used * or ** magic
88 # W0401: Wildcard import X
89 # W0402: Uses of a deprecated module 'string'
90 # W0404: 41: Reimport 'XX' (imported line NN)
92 # W0603: Using the global statement
93 # W0614: Unused import X from wildcard import
94 # W0703: Catch "Exception"
95 # W1201: Specify string format arguments as logging function parameters
96 disable=C0103,C0111,C0302,I0010,I0011,R0201,R0801,R0901,R0902,R0903,R0904,R0911,R0912,R0913,R0914,R0915,R0921,R0922,W0122,W0141,W0142,W0212,W0401,W0402,W0404,W0511,W0603,W0614,W0703,W1201
101 # Set the output format. Available formats are text, parseable, colorized, msvs
102 # (visual studio) and html
105 # Include message's id in output
108 # Put messages in a separate file for each module / package specified on the
109 # command line instead of printing them on stdout. Reports (if any) will be
110 # written in a file name "pylint_global.[txt|html]".
113 # Tells whether to display a full report or only the messages
117 # Python expression which should return a note less than 10 (10 is the highest
118 # note). You have access to the variables errors warning, statement which
119 # respectively contain the number of errors / warnings messages and the total
120 # number of statements analyzed. This is used by the global evaluation report
122 evaluation=10.0 - ((float(5 * error + warning + refactor + convention) / statement) * 10)
124 # Add a comment according to your evaluation note. This is used by the global
125 # evaluation report (RP0004).
131 # Tells whether we should check for unused import in __init__ files.
134 # A regular expression matching the beginning of the name of dummy variables
136 dummy-variables-rgx=_|dummy
138 # List of additional names supposed to be defined in builtins. Remember that
139 # you should avoid to define new builtins when possible.
145 # Tells whether missing members accessed in mixin class should be ignored. A
146 # mixin class is detected if its name ends with "mixin" (case insensitive).
147 ignore-mixin-members=yes
149 # List of classes names for which member attributes should not be checked
150 # (useful for classes with attributes dynamically set).
151 ignored-classes=SQLObject,twisted.internet.reactor,hashlib,google.appengine.api.memcache
153 # When zope mode is activated, add a predefined set of Zope acquired attributes
154 # to generated-members.
157 # List of members which are set dynamically and missed by pylint inference
158 # system, and so shouldn't trigger E0201 when accessed. Python regular
159 # expressions are accepted.
160 generated-members=REQUEST,acl_users,aq_parent
165 # List of note tags to take in consideration, separated by a comma.
171 # Minimum lines number of a similarity.
172 min-similarity-lines=4
174 # Ignore comments when computing similarities.
177 # Ignore docstrings when computing similarities.
178 ignore-docstrings=yes
183 # Maximum number of characters on a single line.
186 # Maximum number of lines in a module
187 max-module-lines=1000
189 # String used as indentation unit. This is usually " " (4 spaces) or "\t" (1
197 # Required attributes for module, separated by a comma
200 # List of builtins function names that should not be used, separated by a comma
201 bad-functions=map,filter,apply,input
203 # Regular expression which should only match correct module names
204 module-rgx=(([a-z_][a-z0-9_]*)|([A-Z][a-zA-Z0-9]+))$
206 # Regular expression which should only match correct module level names
207 const-rgx=(([A-Z_][A-Z0-9_]*)|(__.*__))$
209 # Regular expression which should only match correct class names
210 class-rgx=[A-Z_][a-zA-Z0-9]+$
212 # Regular expression which should only match correct function names
213 function-rgx=[a-z_][a-z0-9_]{2,30}$
215 # Regular expression which should only match correct method names
216 method-rgx=[a-z_][a-z0-9_]{2,30}$
218 # Regular expression which should only match correct instance attribute names
219 attr-rgx=[a-z_][a-z0-9_]{2,30}$
221 # Regular expression which should only match correct argument names
222 argument-rgx=[a-z_][a-z0-9_]{2,30}$
224 # Regular expression which should only match correct variable names
225 variable-rgx=[a-z_][a-z0-9_]{2,30}$
227 # Regular expression which should only match correct list comprehension /
228 # generator expression variable names
229 inlinevar-rgx=[A-Za-z_][A-Za-z0-9_]*$
231 # Good variable names which should always be accepted, separated by a comma
232 good-names=i,j,k,ex,Run,_
234 # Bad variable names which should always be refused, separated by a comma
235 bad-names=foo,bar,baz,toto,tutu,tata
237 # Regular expression which should only match functions or classes name which do
238 # not require a docstring
239 no-docstring-rgx=__.*__
244 # Maximum number of arguments for function / method
247 # Argument names that match this expression will be ignored. Default to name
248 # with leading underscore
249 ignored-argument-names=_.*
251 # Maximum number of locals for function / method body
254 # Maximum number of return / yield for function / method body
257 # Maximum number of branch for function / method body
260 # Maximum number of statements in function / method body
263 # Maximum number of parents for a class (see R0901).
266 # Maximum number of attributes for a class (see R0902).
269 # Minimum number of public methods for a class (see R0903).
272 # Maximum number of public methods for a class (see R0904).
273 max-public-methods=20
278 # List of interface methods to ignore, separated by a comma. This is used for
279 # instance to not check methods defines in Zope's Interface base class.
280 ignore-iface-methods=isImplementedBy,deferred,extends,names,namesAndDescriptions,queryDescriptionFor,getBases,getDescriptionFor,getDoc,getName,getTaggedValue,getTaggedValueTags,isEqualOrExtendedBy,setTaggedValue,isImplementedByInstancesOf,adaptWith,is_implemented_by
282 # List of method names used to declare (i.e. assign) instance attributes.
283 defining-attr-methods=__init__,__new__,setUp
285 # List of valid names for the first argument in a class method.
286 valid-classmethod-first-arg=cls
291 # Deprecated modules which should not be used, separated by a comma
292 deprecated-modules=regsub,string,TERMIOS,Bastion,rexec
294 # Create a graph of every (i.e. internal and external) dependencies in the
295 # given file (report RP0402 must not be disabled)
298 # Create a graph of external dependencies in the given file (report RP0402 must
302 # Create a graph of internal dependencies in the given file (report RP0402 must
309 # Exceptions that will emit a warning when being caught. Defaults to
311 overgeneral-exceptions=Exception