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