Cleanup.
[mailman.git] / pylint.rc
blob13031a15e7272d894d9fab8c9daf26d9f7b2859a
1 # lint Python modules using external checkers.
2
3 # This is the main checker controlling the other ones and the reports
4 # generation. It is itself both a raw checker and an astng checker in order
5 # to:
6 # * handle message activation / deactivation at the module level
7 # * handle some basic but necessary stats'data (number of classes, methods...)
8
9 [MASTER]
11 # Specify a configuration file.
12 #rcfile=
14 # Python code to execute, usually for sys.path manipulation such as
15 # pygtk.require().
16 #init-hook=
18 # Profiled execution.
19 profile=no
21 # Add <file or directory> to the black list. It should be a base name, not a
22 # path. You may set this option multiple times.
23 ignore=CVS
25 # Pickle collected data for later comparisons.
26 persistent=no
28 # Set the cache size for astng objects.
29 cache-size=500
31 # List of plugins (as comma separated values of python modules names) to load,
32 # usually to register additional checkers.
33 load-plugins=
36 [MESSAGES CONTROL]
38 # Enable only checker(s) with the given id(s). This option conflicts with the
39 # disable-checker option
40 #enable-checker=
42 # Enable all checker(s) except those with the given id(s). This option
43 # conflicts with the enable-checker option
44 #disable-checker=
46 # Enable all messages in the listed categories.
47 #enable-msg-cat=
49 # Disable all messages in the listed categories.
50 #disable-msg-cat=
52 # Enable the message(s) with the given id(s).
53 #enable-msg=
55 # Disable the message(s) with the given id(s).
56 # C0103: *Invalid name %s* in module globals
57 # I0011: *Locally disabling %s*
58 # R0903: *Too few public methods*
59 # R0913: *Too many arguments*
60 # R0914: *Too many local variables*
61 # W0142: *Used * or ** magic*
62 # W0704: *Except doesn't do anything*
63 disable-msg=C0103,I0011,R0903,R0913,R0914,W0142,W0704
66 [REPORTS]
68 # Set the output format. Available formats are text, parseable, colorized, msvs
69 # (visual studio) and html
70 output-format=parseable
72 # Include message's id in output
73 include-ids=yes
75 # Put messages in a separate file for each module / package specified on the
76 # command line instead of printing them on stdout. Reports (if any) will be
77 # written in a file name "pylint_global.[txt|html]".
78 files-output=no
80 # Tells wether to display a full report or only the messages
81 reports=no
83 # Python expression which should return a note less than 10 (10 is the highest
84 # note). You have access to the variables errors warning, statement which
85 # respectivly contain the number of errors / warnings messages and the total
86 # number of statements analyzed. This is used by the global evaluation report
87 # (R0004).
88 evaluation=10.0 - ((float(5 * error + warning + refactor + convention) / statement) * 10)
90 # Add a comment according to your evaluation note. This is used by the global
91 # evaluation report (R0004).
92 comment=no
94 # Enable the report(s) with the given id(s).
95 #enable-report=
97 # Disable the report(s) with the given id(s).
98 #disable-report=
101 # checks for :
102 # * doc strings
103 # * modules / classes / functions / methods / arguments / variables name
104 # * number of arguments, local variables, branchs, returns and statements in
105 # functions, methods
106 # * required module attributes
107 # * dangerous default values as arguments
108 # * redefinition of function / method / class
109 # * uses of the global statement
111 [BASIC]
113 # Required attributes for module, separated by a comma
114 required-attributes=
116 # Regular expression which should only match functions or classes name which do
117 # not require a docstring
118 no-docstring-rgx=__.*__
120 # Regular expression which should only match correct module names
121 module-rgx=(([a-z_][a-z0-9_]*)|([A-Z][a-zA-Z0-9]+))$
123 # Regular expression which should only match correct module level names
124 const-rgx=(([A-Z_][A-Z0-9_]*)|(__.*__))$
126 # Regular expression which should only match correct class names
127 class-rgx=[A-Z_][a-zA-Z0-9]+$
129 # Regular expression which should only match correct function names
130 function-rgx=[a-z_][a-z0-9_]{2,30}$
132 # Regular expression which should only match correct method names
133 method-rgx=[a-z_][a-z0-9_]{2,30}$
135 # Regular expression which should only match correct instance attribute names
136 attr-rgx=[a-z_][a-z0-9_]{2,30}$
138 # Regular expression which should only match correct argument names
139 argument-rgx=[a-z_][a-z0-9_]{2,30}$
141 # Regular expression which should only match correct variable names
142 variable-rgx=[a-z_][a-z0-9_]{2,30}$
144 # Regular expression which should only match correct list comprehension /
145 # generator expression variable names
146 inlinevar-rgx=[A-Za-z_][A-Za-z0-9_]*$
148 # Good variable names which should always be accepted, separated by a comma
149 good-names=i,j,k,ex,Run,_
151 # Bad variable names which should always be refused, separated by a comma
152 bad-names=foo,bar,baz,toto,tutu,tata
154 # List of builtins function names that should not be used, separated by a comma
155 bad-functions=map,filter,apply,input
158 # try to find bugs in the code using type inference
160 [TYPECHECK]
162 # Tells wether missing members accessed in mixin class should be ignored. A
163 # mixin class is detected if its name ends with "mixin" (case insensitive).
164 ignore-mixin-members=yes
166 # List of classes names for which member attributes should not be checked
167 # (useful for classes with attributes dynamicaly set).
168 ignored-classes=SQLObject
170 # When zope mode is activated, add a predefined set of Zope acquired attributes
171 # to generated-members.
172 zope=no
174 # List of members which are set dynamically and missed by pylint inference
175 # system, and so shouldn't trigger E0201 when accessed.
176 generated-members=REQUEST,acl_users,aq_parent
179 # checks for
180 # * unused variables / imports
181 # * undefined variables
182 # * redefinition of variable from builtins or from an outer scope
183 # * use of variable before assigment
185 [VARIABLES]
187 # Tells wether we should check for unused import in __init__ files.
188 init-import=no
190 # A regular expression matching names used for dummy variables (i.e. not used).
191 dummy-variables-rgx=_|dummy
193 # List of additional names supposed to be defined in builtins. Remember that
194 # you should avoid to define new builtins when possible.
195 additional-builtins=
198 # checks for :
199 # * methods without self as first argument
200 # * overridden methods signature
201 # * access only to existant members via self
202 # * attributes not defined in the __init__ method
203 # * supported interfaces implementation
204 # * unreachable code
206 [CLASSES]
208 # List of interface methods to ignore, separated by a comma. This is used for
209 # instance to not check methods defines in Zope's Interface base class.
210 ignore-iface-methods=isImplementedBy,deferred,extends,names,namesAndDescriptions,queryDescriptionFor,getBases,getDescriptionFor,getDoc,getName,getTaggedValue,getTaggedValueTags,isEqualOrExtendedBy,setTaggedValue,isImplementedByInstancesOf,adaptWith,is_implemented_by
212 # List of method names used to declare (i.e. assign) instance attributes.
213 defining-attr-methods=__init__,__new__,setUp
216 # checks for sign of poor/misdesign:
217 # * number of methods, attributes, local variables...
218 # * size, complexity of functions, methods
220 [DESIGN]
222 # Maximum number of arguments for function / method
223 max-args=5
225 # Maximum number of locals for function / method body
226 max-locals=15
228 # Maximum number of return / yield for function / method body
229 max-returns=6
231 # Maximum number of branch for function / method body
232 max-branchs=12
234 # Maximum number of statements in function / method body
235 max-statements=50
237 # Maximum number of parents for a class (see R0901).
238 max-parents=7
240 # Maximum number of attributes for a class (see R0902).
241 max-attributes=7
243 # Minimum number of public methods for a class (see R0903).
244 min-public-methods=2
246 # Maximum number of public methods for a class (see R0904).
247 max-public-methods=50
250 # checks for
251 # * external modules dependencies
252 # * relative / wildcard imports
253 # * cyclic imports
254 # * uses of deprecated modules
256 [IMPORTS]
258 # Deprecated modules which should not be used, separated by a comma
259 deprecated-modules=regsub,TERMIOS,Bastion,rexec
261 # Create a graph of every (i.e. internal and external) dependencies in the
262 # given file (report R0402 must not be disabled)
263 import-graph=
265 # Create a graph of external dependencies in the given file (report R0402 must
266 # not be disabled)
267 ext-import-graph=
269 # Create a graph of internal dependencies in the given file (report R0402 must
270 # not be disabled)
271 int-import-graph=
274 # checks for :
275 # * unauthorized constructions
276 # * strict indentation
277 # * line length
278 # * use of <> instead of !=
280 [FORMAT]
282 # Maximum number of characters on a single line.
283 max-line-length=80
285 # Maximum number of lines in a module
286 max-module-lines=1000
288 # String used as indentation unit. This is usually " " (4 spaces) or "\t" (1
289 # tab).
290 indent-string='    '
293 # checks for:
294 # * warning notes in the code like FIXME, XXX
295 # * PEP 263: source code with non ascii character but no encoding declaration
297 [MISCELLANEOUS]
299 # List of note tags to take in consideration, separated by a comma.
300 notes=FIXME,XXX,TODO
303 # checks for similarities and duplicated code. This computation may be
304 # memory / CPU intensive, so you should disable it if you experiments some
305 # problems.
307 [SIMILARITIES]
309 # Minimum lines number of a similarity.
310 min-similarity-lines=4
312 # Ignore comments when computing similarities.
313 ignore-comments=yes
315 # Ignore docstrings when computing similarities.
316 ignore-docstrings=yes