root/gaphor/tags/gaphor-0.12.0/pylintrc

Revision 1121, 9.8 kB (checked in by arjanmol, 2 years ago)

Merged changed from new-canvas branch to trunk

Line 
1 # lint Python modules using external checkers.
2 #
3 # $Revision: 866 $
4 # $HeadURL: https://svn.sourceforge.net/svnroot/gaphor/gaphas/trunk/pylintrc $
5 #
6 # This is the main checker controling the other ones and the reports
7 # generation. It is itself both a raw checker and an astng checker in order
8 # to:
9 # * handle message activation / deactivation at the module level
10 # * handle some basic but necessary stats'data (number of classes, methods...)
11 #
12 # This checker also defines the following reports:
13 # * R0001: Total errors / warnings
14 # * R0002: % errors / warnings by module
15 # * R0003: Messages
16 # * R0004: Global evaluation
17 [MASTER]
18
19 # Profiled execution.
20 profile=no
21
22 # Add <file or directory> to the black list. It should be a base name, not a
23 # path. You may set this option multiple times.
24 ignore=CVS
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 [REPORTS]
38
39 # Tells wether to display a full report or only the messages
40 reports=yes
41
42 # Use HTML as output format instead of text
43 html=no
44
45 # Use a parseable text output format, so your favorite text editor will be able
46 # to jump to the line corresponding to a message.
47 parseable=no
48
49 # Colorizes text output using ansi escape codes
50 color=no
51
52 # Put messages in a separate file for each module / package specified on the
53 # command line instead of printing them on stdout. Reports (if any) will be
54 # written in a file name "pylint_global.[txt|html]".
55 files-output=no
56
57 # Python expression which should return a note less than 10 (10 is the highest
58 # note).You have access to the variables errors warning, statement which
59 # respectivly contain the number of errors / warnings messages and the total
60 # number of statements analyzed. This is used by the global evaluation report
61 # (R0004).
62 evaluation=10.0 - ((float(5 * error + warning + refactor + convention) / statement) * 10)
63
64 # Add a comment according to your evaluation note. This is used by the global
65 # evaluation report (R0004).
66 comment=no
67
68 # Include message's id in output
69 include-ids=no
70
71
72 # checks for :
73 # * doc strings
74 # * modules / classes / functions / methods / arguments / variables name
75 # * number of arguments, local variables, branchs, returns and statements in
76 # functions, methods
77 # * required module attributes
78 # * dangerous default values as arguments
79 # * redefinition of function / method / class
80 # * uses of the global statement
81 #
82 # This checker also defines the following reports:
83 # * R0101: Statistics by type
84 [BASIC]
85
86 # Enable / disable this checker
87 enable-basic=yes
88
89 # Required attributes for module, separated by a comma
90 required-attributes=__version__
91
92 # Regular expression which should only match functions or classes name which do
93 # not require a docstring
94 no-docstring-rgx=__.*__
95
96 # Regular expression which should only match correct module names
97 module-rgx=(([a-z_][a-z0-9_]*)|([A-Z][a-zA-Z0-9]+))$
98
99 # Regular expression which should only match correct module level names
100 const-rgx=(([A-Z_][A-Z1-9_]*)|(__.*__))$
101
102 # Regular expression which should only match correct class names
103 class-rgx=[A-Z_][a-zA-Z0-9]+$
104
105 # Regular expression which should only match correct function names
106 function-rgx=[a-z_][a-z0-9_]{0,30}$
107
108 # Regular expression which should only match correct method names
109 method-rgx=[a-z_][a-z0-9_]{2,30}$
110
111 # Regular expression which should only match correct instance attribute names
112 attr-rgx=[a-z_][a-z0-9_]{0,30}$
113
114 # Regular expression which should only match correct argument names
115 argument-rgx=[a-z_][a-z0-9_]{0,30}$
116
117 # Regular expression which should only match correct variable names
118 variable-rgx=[a-z_][a-z0-9_]{0,30}$
119
120 # Regular expression which should only match correct list comprehension /
121 # generator expression variable names
122 inlinevar-rgx=[A-Za-z_][A-Za-z0-9_]*$
123
124 # Good variable names which should always be accepted, separated by a comma
125 good-names=i,j,k,ex,Run,_
126
127 # Bad variable names which should always be refused, separated by a comma
128 bad-names=foo,bar,baz,toto,tutu,tata
129
130 # List of builtins function names that should not be used, separated by a comma
131 bad-functions=map,filter,apply,input
132
133
134 # try to find bugs in the code using type inference
135 #
136 [TYPECHECK]
137
138 # Enable / disable this checker
139 enable-typecheck=yes
140
141 # Tells wether missing members accessed in mixin class should be ignored. A
142 # mixin class is detected if its name ends with "mixin" (case insensitive).
143 ignore-mixin-members=yes
144
145 # When zope mode is activated, consider the acquired-members option to ignore
146 # access to some undefined attributes.
147 zope=no
148
149 # List of members which are usually get through zope's acquisition mecanism and
150 # so shouldn't trigger E0201 when accessed (need zope=yes to be considered.
151 acquired-members=REQUEST,acl_users,aq_parent
152
153
154 # checks for
155 # * unused variables / imports
156 # * undefined variables
157 # * redefinition of variable from builtins or from an outer scope
158 # * use of variable before assigment
159 #
160 [VARIABLES]
161
162 # Enable / disable this checker
163 enable-variables=yes
164
165 # Tells wether we should check for unused import in __init__ files.
166 init-import=no
167
168 # A regular expression matching names used for dummy variables (i.e. not used).
169 dummy-variables-rgx=_|dummy
170
171 # List of additional names supposed to be defined in builtins. Remember that
172 # you should avoid to define new builtins when possible.
173 additional-builtins=
174
175
176 # checks for :
177 # * methods without self as first argument
178 # * overriden methods signature
179 # * access only to existant members via self
180 # * attributes not defined in the __init__ method
181 # * supported interfaces implementation
182 # * unreachable code
183 #
184 [CLASSES]
185
186 # Enable / disable this checker
187 enable-classes=yes
188
189 # List of interface methods to ignore, separated by a comma. This is used for
190 # instance to not check methods defines in Zope's Interface base class.
191 ignore-iface-methods=isImplementedBy,deferred,extends,names,namesAndDescriptions,queryDescriptionFor,getBases,getDescriptionFor,getDoc,getName,getTaggedValue,getTaggedValueTags,isEqualOrExtendedBy,setTaggedValue,isImplementedByInstancesOf,adaptWith,is_implemented_by
192
193 # List of method names used to declare (i.e. assign) instance attributes.
194 defining-attr-methods=__init__,__new__,setUp
195
196
197 # checks for sign of poor/misdesign:
198 # * number of methods, attributes, local variables...
199 # * size, complexity of functions, methods
200 #
201 [DESIGN]
202
203 # Enable / disable this checker
204 enable-design=yes
205
206 # Maximum number of arguments for function / method
207 max-args=5
208
209 # Maximum number of locals for function / method body
210 max-locals=15
211
212 # Maximum number of return / yield for function / method body
213 max-returns=6
214
215 # Maximum number of branch for function / method body
216 max-branchs=12
217
218 # Maximum number of statements in function / method body
219 max-statements=50
220
221 # Maximum number of parents for a class (see R0901).
222 max-parents=7
223
224 # Maximum number of attributes for a class (see R0902).
225 max-attributes=7
226
227 # Minimum number of public methods for a class (see R0903).
228 min-public-methods=2
229
230 # Maximum number of public methods for a class (see R0904).
231 max-public-methods=20
232
233
234 # checks for
235 # * external modules dependencies
236 # * relative / wildcard imports
237 # * cyclic imports
238 # * uses of deprecated modules
239 #
240 # This checker also defines the following reports:
241 # * R0401: External dependencies
242 # * R0402: Modules dependencies graph
243 [IMPORTS]
244
245 # Enable / disable this checker
246 enable-imports=yes
247
248 # Deprecated modules which should not be used, separated by a comma
249 deprecated-modules=regsub,string,TERMIOS,Bastion,rexec
250
251 # Create a graph of every (i.e. internal and external) dependencies in the
252 # given file (report R0402 must not be disabled)
253 import-graph=
254
255 # Create a graph of external dependencies in the given file (report R0402 must
256 # not be disabled)
257 ext-import-graph=
258
259 # Create a graph of internal dependencies in the given file (report R0402 must
260 # not be disabled)
261 int-import-graph=
262
263
264 # checks for usage of new style capabilities on old style classes and
265 # other new/old styles conflicts problems
266 # * use of property, __slots__, super
267 # * "super" usage
268 # * raising a new style class as exception
269 #
270 [NEWSTYLE]
271
272 # Enable / disable this checker
273 enable-newstyle=yes
274
275
276 # checks for
277 # * excepts without exception filter
278 # * string exceptions
279 #
280 [EXCEPTIONS]
281
282 # Enable / disable this checker
283 enable-exceptions=yes
284
285
286 # checks for :
287 # * unauthorized constructions
288 # * strict indentation
289 # * line length
290 # * use of <> instead of !=
291 #
292 [FORMAT]
293
294 # Enable / disable this checker
295 enable-format=yes
296
297 # Maximum number of characters on a single line.
298 max-line-length=80
299
300 # Maximum number of lines in a module
301 max-module-lines=1000
302
303 # String used as indentation unit. This is usually " " (4 spaces) or "\t" (1
304 # tab).
305 indent-string='    '
306
307
308 # checks for:
309 # * warning notes in the code like FIXME, XXX
310 # * PEP 263: source code with non ascii character but no encoding declaration
311 #
312 [MISCELLANEOUS]
313
314 # Enable / disable this checker
315 enable-miscellaneous=yes
316
317 # List of note tags to take in consideration, separated by a comma. Default to
318 # FIXME, XXX, TODO
319 notes=FIXME,XXX,TODO
320
321
322 # does not check anything but gives some raw metrics :
323 # * total number of lines
324 # * total number of code lines
325 # * total number of docstring lines
326 # * total number of comments lines
327 # * total number of empty lines
328 #
329 # This checker also defines the following reports:
330 # * R0701: Raw metrics
331 [METRICS]
332
333 # Enable / disable this checker
334 enable-metrics=yes
335
336
337 # checks for similarities and duplicated code. This computation may be
338 # memory / CPU intensive, so you should disable it if you experiments some
339 # problems.
340 #
341 # This checker also defines the following reports:
342 # * R0801: Duplication
343 [SIMILARITIES]
344
345 # Enable / disable this checker
346 enable-similarities=yes
347
348 # Minimum lines number of a similarity.
349 min-similarity-lines=4
350
351 # Ignore comments when computing similarities.
352 ignore-comments=yes
353
354 # Ignore docstrings when computing similarities.
355 ignore-docstrings=yes
Note: See TracBrowser for help on using the browser.