fix bug 398103 to properly delete broken symlinks and not abort.
[gentoolkit.git] / pylintrc
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]
10
11 # Specify a configuration file.
12 #rcfile=
13
14 # Python code to execute, usually for sys.path manipulation such as
15 # pygtk.require().
16 #init-hook=
17
18 # Profiled execution.
19 profile=no
20
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
24 ignore=.svn
25
26 # Pickle collected data for later comparisons.
27 persistent=yes
28
29 # Set the cache size for astng objects.
30 cache-size=500
31
32 # List of plugins (as comma separated values of python modules names) to load,
33 # usually to register additional checkers.
34 load-plugins=
35
36
37 [MESSAGES CONTROL]
38
39 # Enable only checker(s) with the given id(s). This option conflicts with the
40 # disable-checker option
41 #enable-checker=
42
43 # Enable all checker(s) except those with the given id(s). This option
44 # conflicts with the enable-checker option
45 #disable-checker=
46
47 # Enable all messages in the listed categories (IRCWEF).
48 #enable-msg-cat=
49
50 # Disable all messages in the listed categories (IRCWEF).
51 disable-msg-cat=I
52
53 # Enable the message(s) with the given id(s).
54 #enable-msg=
55
56 # Disable the message(s) with the given id(s).
57 # :W0704: *Except doesn't do anything*
58 # :W0231: *__init__ method from base class %r is not called*
59 # :R0903: *Too few public methods (%s/%s)*
60 disable-msg=W0704,W0231,R0903
61
62
63 [REPORTS]
64
65 # Set the output format. Available formats are text, parseable, colorized, msvs
66 # (visual studio) and html
67 output-format=colorized
68
69 # Include message's id in output
70 include-ids=yes
71
72 # Put messages in a separate file for each module / package specified on the
73 # command line instead of printing them on stdout. Reports (if any) will be
74 # written in a file name "pylint_global.[txt|html]".
75 files-output=no
76
77 # Tells wether to display a full report or only the messages
78 reports=yes
79
80 # Python expression which should return a note less than 10 (10 is the highest
81 # note). You have access to the variables errors warning, statement which
82 # respectively contain the number of errors / warnings messages and the total
83 # number of statements analyzed. This is used by the global evaluation report
84 # (R0004).
85 evaluation=10.0 - ((float(5 * error + warning + refactor + convention) / statement) * 10)
86
87 # Add a comment according to your evaluation note. This is used by the global
88 # evaluation report (R0004).
89 comment=no
90
91 # Enable the report(s) with the given id(s).
92 #enable-report=
93
94 # Disable the report(s) with the given id(s).
95 #disable-report=
96
97
98 # checks for
99 # * unused variables / imports
100 # * undefined variables
101 # * redefinition of variable from builtins or from an outer scope
102 # * use of variable before assignment
103 #
104 [VARIABLES]
105
106 # Tells whether we should check for unused import in __init__ files.
107 init-import=no
108
109 # A regular expression matching names used for dummy variables (i.e. not used).
110 dummy-variables-rgx=_|dummy
111
112 # List of additional names supposed to be defined in builtins. Remember that
113 # you should avoid to define new builtins when possible.
114 additional-builtins=
115
116
117 # checks for :
118 # * doc strings
119 # * modules / classes / functions / methods / arguments / variables name
120 # * number of arguments, local variables, branches, returns and statements in
121 # functions, methods
122 # * required module attributes
123 # * dangerous default values as arguments
124 # * redefinition of function / method / class
125 # * uses of the global statement
126 #
127 [BASIC]
128
129 # Required attributes for module, separated by a comma
130 required-attributes=
131
132 # Regular expression which should only match functions or classes name which do
133 # not require a docstring
134 # was no-docstring-rgx=__.*__
135 no-docstring-rgx=_.*
136
137 # Regular expression which should only match correct module names
138 module-rgx=(([a-z_][a-z0-9_]*)|([A-Z][a-zA-Z0-9]+))$
139
140 # Regular expression which should only match correct module level names
141 const-rgx=(([A-Z_][A-Z0-9_]*)|(__.*__))$
142
143 # Regular expression which should only match correct class names
144 class-rgx=[A-Z_][a-zA-Z0-9]+$
145
146 # Regular expression which should only match correct function names
147 function-rgx=[a-z_][a-z0-9_]{2,30}$
148
149 # Regular expression which should only match correct method names
150 method-rgx=[a-z_][a-z0-9_]{2,30}$
151
152 # Regular expression which should only match correct instance attribute names
153 # was attr-rgx=[a-z_][a-z0-9_]{2,30}$
154 attr-rgx=[a-z_][a-z0-9_]{1,30}$
155
156 # Regular expression which should only match correct argument names
157 # was argument-rgx=[a-z_][a-z0-9_]{2,30}$
158 argument-rgx=[a-z_][a-z0-9_]{1,30}$
159
160 # Regular expression which should only match correct variable names
161 # was variable-rgx=[a-z_][a-z0-9_]{2,30}$
162 variable-rgx=[a-z_][a-z0-9_]{1,30}$
163
164 # Regular expression which should only match correct list comprehension /
165 # generator expression variable names
166 inlinevar-rgx=[A-Za-z_][A-Za-z0-9_]*$
167
168 # Good variable names which should always be accepted, separated by a comma
169 good-names=i,j,k,ex,Run,_
170
171 # Bad variable names which should always be refused, separated by a comma
172 bad-names=foo,bar,baz,toto,tutu,tata
173
174 # List of builtins function names that should not be used, separated by a comma
175 bad-functions=map,filter,apply,input
176
177
178 # try to find bugs in the code using type inference
179 #
180 [TYPECHECK]
181
182 # Tells whether missing members accessed in mixin class should be ignored. A
183 # mixin class is detected if its name ends with "mixin" (case insensitive).
184 ignore-mixin-members=yes
185
186 # List of classes names for which member attributes should not be checked
187 # (useful for classes with attributes dynamically set).
188 ignored-classes=SQLObject
189
190 # When zope mode is activated, add a predefined set of Zope acquired attributes
191 # to generated-members.
192 zope=no
193
194 # List of members which are set dynamically and missed by pylint inference
195 # system, and so shouldn't trigger E0201 when accessed.
196 generated-members=REQUEST,acl_users,aq_parent
197
198
199 # checks for
200 # * external modules dependencies
201 # * relative / wildcard imports
202 # * cyclic imports
203 # * uses of deprecated modules
204 #
205 [IMPORTS]
206
207 # Deprecated modules which should not be used, separated by a comma
208 deprecated-modules=regsub,string,TERMIOS,Bastion,rexec
209
210 # Create a graph of every (i.e. internal and external) dependencies in the
211 # given file (report R0402 must not be disabled)
212 import-graph=
213
214 # Create a graph of external dependencies in the given file (report R0402 must
215 # not be disabled)
216 ext-import-graph=
217
218 # Create a graph of internal dependencies in the given file (report R0402 must
219 # not be disabled)
220 int-import-graph=
221
222
223 # checks for :
224 # * methods without self as first argument
225 # * overridden methods signature
226 # * access only to existent members via self
227 # * attributes not defined in the __init__ method
228 # * supported interfaces implementation
229 # * unreachable code
230 #
231 [CLASSES]
232
233 # List of interface methods to ignore, separated by a comma. This is used for
234 # instance to not check methods defines in Zope's Interface base class.
235 ignore-iface-methods=isImplementedBy,deferred,extends,names,namesAndDescriptions,queryDescriptionFor,getBases,getDescriptionFor,getDoc,getName,getTaggedValue,getTaggedValueTags,isEqualOrExtendedBy,setTaggedValue,isImplementedByInstancesOf,adaptWith,is_implemented_by
236
237 # List of method names used to declare (i.e. assign) instance attributes.
238 defining-attr-methods=__init__,__new__,setUp
239
240
241 # checks for sign of poor/misdesign:
242 # * number of methods, attributes, local variables...
243 # * size, complexity of functions, methods
244 #
245 [DESIGN]
246
247 # Maximum number of arguments for function / method
248 # was max-args=5
249 max-args=10
250
251 # Maximum number of locals for function / method body
252 max-locals=15
253
254 # Maximum number of return / yield for function / method body
255 # was max-returns=6
256 max-returns=10
257
258 # Maximum number of branch for function / method body
259 max-branchs=12
260
261 # Maximum number of statements in function / method body
262 max-statements=50
263
264 # Maximum number of parents for a class (see R0901).
265 max-parents=7
266
267 # Maximum number of attributes for a class (see R0902).
268 # was max-attributes=7
269 max-attributes=10
270
271 # Minimum number of public methods for a class (see R0903).
272 min-public-methods=2
273
274 # Maximum number of public methods for a class (see R0904).
275 max-public-methods=20
276
277
278 # checks for:
279 # * warning notes in the code like FIXME, XXX
280 # * PEP 263: source code with non ascii character but no encoding declaration
281 #
282 [MISCELLANEOUS]
283
284 # List of note tags to take in consideration, separated by a comma.
285 notes=FIXME,XXX,TODO
286
287
288 # checks for similarities and duplicated code. This computation may be
289 # memory / CPU intensive, so you should disable it if you experiments some
290 # problems.
291 #
292 [SIMILARITIES]
293
294 # Minimum lines number of a similarity.
295 min-similarity-lines=4
296
297 # Ignore comments when computing similarities.
298 ignore-comments=yes
299
300 # Ignore docstrings when computing similarities.
301 ignore-docstrings=yes
302
303
304 # checks for :
305 # * unauthorized constructions
306 # * strict indentation
307 # * line length
308 # * use of <> instead of !=
309 #
310 [FORMAT]
311
312 # Maximum number of characters on a single line.
313 max-line-length=80
314
315 # Maximum number of lines in a module
316 max-module-lines=1000
317
318 # String used as indentation unit. This is usually " " (4 spaces) or "\t" (1
319 # tab).
320 indent-string='\t'
321 #indent-string='    '