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