Statistics
| Branch: | Tag: | Revision:

mininet / .pylint @ 083322a2

History | View | Annotate | Download (8.74 KB)

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