1 # This is a configuration file for pylint to be used for checking the
2 # quality of the Melange code
5 # scripts/pylint/do_pylint.sh
12 # Add <file or directory> to the black list. It should be a base name, not a
13 # path. You may set this option multiple times.
16 # Pickle collected data for later comparisons.
19 # Set the cache size for astng objects.
22 # List of plugins (as comma separated values of python modules names) to load,
23 # usually to register additional checkers.
29 # Enable only checker(s) with the given id(s). This option conflicts with the
30 # disable-checker option
33 # Enable all checker(s) except those with the given id(s). This option
34 # conflicts with the enable-checker option
35 disable-checker=design
37 # Enable all messages in the listed categories.
40 # Disable all messages in the listed categories.
43 # Enable the message(s) with the given id(s).
47 # Disable the message(s) with the given id(s).
48 # List of all available ids: http://www.logilab.org/card/pylintfeatures
49 # Potential messages that might be added later include:
53 # W0613: Unused argument %r Used when a function or method argument is not used.
54 # W0622: Redefining built-in %r Used when a variable or function override a built-in.
55 # W0232: Class has no __init__ method Used when a class has no __init__ method, neither
57 # W0142: Used * or * magic* Used when a function or method is called using *args or **kwargs
58 # to dispatch arguments. This doesn't improve readility and should be used with care.
59 # W0102: Dangerous default value %s as argument Used when a mutable value as list or dictionary
60 # is detected in a default value for an argument.
61 # W0212: Access to a protected member %s of a client class Used when a protected member
62 # (i.e. class member with a name beginning with an underscore) is access outside the class
63 # or a descendant of the class where it's defined.
64 # R0201: Method could be a function. Used when a method doesn't use its bound instance, and so
65 # could be written as a function.
66 # R0801: Similar lines in %s files. Indicates that a set of similar lines has been detected
67 # among multiple file. This usually means that the code should be refactored to avoid this
69 # E1103: %s %r has no %r member (but some types could not be inferred) Used when a variable is
70 # accessed for an unexistant member, but astng was not able to interpret all possible
71 # types of this variable.
72 # E1101: %s %r has no %r member Used when a variable is accessed for an unexistant member.
73 # C0302: Too many lines in module (%s) Used when a module has too much lines, reducing
75 # W0602: Using global for %r but no assigment is done Used when a variable is defined through
76 # the "global" statement but no assigment to this variable is done.
77 # W0603: Using the global statement Used when you use the "global" statement to update
78 # a global variable. PyLint just try to discourage this usage. That doesn't mean
79 # you can not use it !
80 # W0704: Except doesn't do anything Used when an except clause does nothing but "pass"
81 # and there is no "else" clause.
82 # I0011: Locally disabling %s Used when an inline option disable a message or a messages category.
83 disable-msg=W0613,W0622,W0232,W0142,W0102,W0212,R0201,R0801,E1103,E1101,C0302,W0602,W0603,W0704,I0011
88 # set the output format. Available formats are text, parseable, colorized, msvs
89 # (visual studio) and html
92 # Include message's id in output
95 # Put messages in a separate file for each module / package specified on the
96 # command line instead of printing them on stdout. Reports (if any) will be
97 # written in a file name "pylint_global.[txt|html]".
100 # Tells wether to display a full report or only the messages
103 # Python expression which should return a note less than 10 (10 is the highest
104 # note).You have access to the variables errors warning, statement which
105 # respectivly contain the number of errors / warnings messages and the total
106 # number of statements analyzed. This is used by the global evaluation report
108 evaluation=10.0 - ((float(5 * error + warning + refactor + convention) / statement) * 10)
110 # Add a comment according to your evaluation note. This is used by the global
111 # evaluation report (R0004).
114 # Enable the report(s) with the given id(s).
117 # Disable the report(s) with the given id(s).
123 # * modules / classes / functions / methods / arguments / variables name
124 # * number of arguments, local variables, branchs, returns and statements in
126 # * required module attributes
127 # * dangerous default values as arguments
128 # * redefinition of function / method / class
129 # * uses of the global statement
133 # Required attributes for module, separated by a comma
136 # Regular expression which should only match functions or classes name which do
137 # not require a docstring
138 no-docstring-rgx=__.*__
140 # Regular expression which should only match correct module names
141 module-rgx=(([a-z_][a-z0-9_]*)|([A-Z][a-zA-Z0-9]+))$
143 # Regular expression which should only match correct module level names
144 const-rgx=(([A-Z_][A-Z1-9_]*)|(__.*__)|([a-z_][a-z0-9_]*))$
146 # Regular expression which should only match correct class names
147 class-rgx=[a-zA-Z0-9]+$
149 # Regular expression which should only match correct function names
150 function-rgx=[a-z_][a-zA-Z0-9_]{2,40}$
152 # Regular expression which should only match correct method names
153 method-rgx=[a-z_][a-zA-Z0-9_]{2,40}$
155 # Regular expression which should only match correct instance attribute names
156 attr-rgx=[a-z_][a-z0-9_]{1,30}$
158 #attr-rgx=([a-z_][a-z0-9_]{2,30}|([a-z_][a-zA-Z0-9]{2,30}))$
160 # Regular expression which should only match correct argument names
161 argument-rgx=[a-z_][a-z0-9_]{1,30}$
163 # Regular expression which should only match correct variable names
164 variable-rgx=[a-z_][a-zA-Z0-9_]{1,30}$
166 # Regular expression which should only match correct list comprehension /
167 # generator expression variable names
168 inlinevar-rgx=[A-Za-z_][A-Za-z0-9_]*$
170 # Good variable names which should always be accepted, separated by a comma
171 good-names=i,j,k,ex,Run,_
173 # Bad variable names which should always be refused, separated by a comma
174 bad-names=foo,bar,baz,toto,tutu,tata
176 # List of builtins function names that should not be used, separated by a comma
177 bad-functions=map,filter,apply,input
180 # try to find bugs in the code using type inference
184 # Tells wether missing members accessed in mixin class should be ignored. A
185 # mixin class is detected if its name ends with "mixin" (case insensitive).
186 ignore-mixin-members=yes
188 # List of classes names for which member attributes should not be checked
189 # (useful for classes with attributes dynamicaly set).
190 ignored-classes=SQLObject
192 # When zope mode is activated, consider the acquired-members option to ignore
193 # access to some undefined attributes.
196 # List of members which are usually get through zope's acquisition mecanism and
197 # so shouldn't trigger E0201 when accessed (need zope=yes to be considered).
198 acquired-members=REQUEST,acl_users,aq_parent
202 # * unused variables / imports
203 # * undefined variables
204 # * redefinition of variable from builtins or from an outer scope
205 # * use of variable before assigment
209 # Tells wether we should check for unused import in __init__ files.
212 # A regular expression matching names used for dummy variables (i.e. not used).
213 dummy-variables-rgx=_|dummy
215 # List of additional names supposed to be defined in builtins. Remember that
216 # you should avoid to define new builtins when possible.
221 # * methods without self as first argument
222 # * overridden methods signature
223 # * access only to existant members via self
224 # * attributes not defined in the __init__ method
225 # * supported interfaces implementation
230 # List of interface methods to ignore, separated by a comma. This is used for
231 # instance to not check methods defines in Zope's Interface base class.
232 ignore-iface-methods=isImplementedBy,deferred,extends,names,namesAndDescriptions,queryDescriptionFor,getBases,getDescriptionFor,getDoc,getName,getTaggedValue,getTaggedValueTags,isEqualOrExtendedBy,setTaggedValue,isImplementedByInstancesOf,adaptWith,is_implemented_by
234 # List of method names used to declare (i.e. assign) instance attributes.
235 defining-attr-methods=__init__,__new__,setUp
239 # * external modules dependencies
240 # * relative / wildcard imports
242 # * uses of deprecated modules
246 # Deprecated modules which should not be used, separated by a comma
247 deprecated-modules=regsub,string,TERMIOS,Bastion,rexec
249 # Create a graph of every (i.e. internal and external) dependencies in the
250 # given file (report R0402 must not be disabled)
253 # Create a graph of external dependencies in the given file (report R0402 must
257 # Create a graph of internal dependencies in the given file (report R0402 must
263 # * unauthorized constructions
264 # * strict indentation
266 # * use of <> instead of !=
270 # Maximum number of characters on a single line.
273 # Maximum number of lines in a module
274 max-module-lines=1000
276 # String used as indentation unit. This is usually " " (4 spaces) or "\t" (1
282 # * warning notes in the code like TODO
283 # * PEP 263: source code with non ascii character but no encoding declaration
287 # List of note tags to take in consideration, separated by a comma.
291 # checks for similarities and duplicated code. This computation may be
292 # memory / CPU intensive, so you should disable it if you experiments some
297 # Minimum lines number of a similarity.
298 min-similarity-lines=4
300 # Ignore comments when computing similarities.
303 # Ignore docstrings when computing similarities.
304 ignore-docstrings=yes