~canonical-livepatch-dependencies/canonical-livepatch-service-dependencies/python-coverage

« back to all changes in this revision

Viewing changes to pylintrc

  • Committer: Free Ekanayaka
  • Author(s): Ben Finney
  • Date: 2016-07-12 10:53:39 UTC
  • Revision ID: free.ekanayaka@canonical.com-20160712105339-0ferzawnonlolw9x
Tags: upstream-4.1+dfsg.1
ImportĀ upstreamĀ versionĀ 4.1+dfsg.1

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
# Licensed under the Apache License: http://www.apache.org/licenses/LICENSE-2.0
 
2
# For details: https://bitbucket.org/ned/coveragepy/src/default/NOTICE.txt
 
3
 
 
4
# lint Python modules using external checkers.
 
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
[MASTER]
 
13
 
 
14
# Specify a configuration file.
 
15
#rcfile=
 
16
 
 
17
# Python code to execute, usually for sys.path manipulation such as
 
18
# pygtk.require().
 
19
#init-hook=
 
20
 
 
21
# Profiled execution.
 
22
profile=no
 
23
 
 
24
# Add <file or directory> to the black list. It should be a base name, not a
 
25
# path. You may set this option multiple times.
 
26
ignore=
 
27
 
 
28
# Pickle collected data for later comparisons.
 
29
persistent=no
 
30
 
 
31
# Set the cache size for astng objects.
 
32
cache-size=500
 
33
 
 
34
# List of plugins (as comma separated values of python modules names) to load,
 
35
# usually to register additional checkers.
 
36
load-plugins=
 
37
 
 
38
 
 
39
[MESSAGES CONTROL]
 
40
 
 
41
# Enable only checker(s) with the given id(s). This option conflicts with the
 
42
# disable-checker option
 
43
#enable-checker=
 
44
 
 
45
# Enable all checker(s) except those with the given id(s). This option
 
46
# conflicts with the enable-checker option
 
47
#disable-checker=
 
48
 
 
49
# Enable all messages in the listed categories.
 
50
#enable-msg-cat=
 
51
 
 
52
# Disable all messages in the listed categories.
 
53
#disable-msg-cat=
 
54
 
 
55
# Enable the message(s) with the given id(s).
 
56
enable=
 
57
    useless-suppression
 
58
 
 
59
# Disable the message(s) with the given id(s).
 
60
disable= 
 
61
    spelling,
 
62
# Messages that are just silly:
 
63
    locally-disabled,
 
64
    exec-used,
 
65
    no-init,
 
66
    bad-whitespace,
 
67
    global-statement,
 
68
    broad-except,
 
69
# Messages that may be silly:
 
70
    no-self-use,
 
71
    no-member,
 
72
# formatting stuff
 
73
    superfluous-parens,bad-continuation,
 
74
# Messages that are noisy for now, eventually maybe we'll turn them on:
 
75
    invalid-name,
 
76
    protected-access,
 
77
    duplicate-code,
 
78
    cyclic-import
 
79
 
 
80
msg-template={path}:{line}: {msg} ({symbol})
 
81
 
 
82
[REPORTS]
 
83
 
 
84
# set the output format. Available formats are text, parseable, colorized, msvs
 
85
# (visual studio) and html
 
86
output-format=text
 
87
 
 
88
# Put messages in a separate file for each module / package specified on the
 
89
# command line instead of printing them on stdout. Reports (if any) will be
 
90
# written in a file name "pylint_global.[txt|html]".
 
91
files-output=no
 
92
 
 
93
# Tells wether to display a full report or only the messages
 
94
reports=no
 
95
 
 
96
# Python expression which should return a note less than 10 (10 is the highest
 
97
# note).You have access to the variables errors warning, statement which
 
98
# respectivly contain the number of errors / warnings messages and the total
 
99
# number of statements analyzed. This is used by the global evaluation report
 
100
# (R0004).
 
101
evaluation=10.0 - ((float(5 * error + warning + refactor + convention) / statement) * 10)
 
102
 
 
103
# Add a comment according to your evaluation note. This is used by the global
 
104
# evaluation report (R0004).
 
105
comment=no
 
106
 
 
107
# Enable the report(s) with the given id(s).
 
108
#enable-report=
 
109
 
 
110
# Disable the report(s) with the given id(s).
 
111
#disable-report=
 
112
 
 
113
 
 
114
# checks for :
 
115
# * doc strings
 
116
# * modules / classes / functions / methods / arguments / variables name
 
117
# * number of arguments, local variables, branchs, returns and statements in
 
118
# functions, methods
 
119
# * required module attributes
 
120
# * dangerous default values as arguments
 
121
# * redefinition of function / method / class
 
122
# * uses of the global statement
 
123
 
124
[BASIC]
 
125
 
 
126
# Required attributes for module, separated by a comma
 
127
required-attributes=
 
128
 
 
129
# Regular expression which should only match functions or classes name which do
 
130
# not require a docstring
 
131
# Special methods don't: __foo__
 
132
# Test methods don't: testXXXX
 
133
# TestCase overrides don't: setUp, tearDown
 
134
# Dispatched methods don't: _xxx__Xxxx
 
135
no-docstring-rgx=__.*__|test[A-Z_].*|setUp|tearDown|_.*__.*
 
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}$|setUp|tearDown|test_.*
 
151
 
 
152
# Regular expression which should only match correct instance attribute names
 
153
attr-rgx=[a-z_][a-z0-9_]{2,30}$
 
154
 
 
155
# Regular expression which should only match correct argument names
 
156
argument-rgx=[a-z_][a-z0-9_]{2,30}$
 
157
 
 
158
# Regular expression which should only match correct variable names
 
159
variable-rgx=[a-z_][a-z0-9_]{2,30}$
 
160
 
 
161
# Regular expression which should only match correct list comprehension /
 
162
# generator expression variable names
 
163
inlinevar-rgx=[A-Za-z_][A-Za-z0-9_]*$
 
164
 
 
165
# Good variable names which should always be accepted, separated by a comma
 
166
good-names=i,j,k,ex,Run,_
 
167
 
 
168
# Bad variable names which should always be refused, separated by a comma
 
169
bad-names=foo,bar,baz,toto,tutu,tata
 
170
 
 
171
# List of builtins function names that should not be used, separated by a comma
 
172
bad-functions=
 
173
 
 
174
 
 
175
# try to find bugs in the code using type inference
 
176
 
177
[TYPECHECK]
 
178
 
 
179
# Tells wether missing members accessed in mixin class should be ignored. A
 
180
# mixin class is detected if its name ends with "mixin" (case insensitive).
 
181
ignore-mixin-members=yes
 
182
 
 
183
# List of classes names for which member attributes should not be checked
 
184
# (useful for classes with attributes dynamicaly set).
 
185
ignored-classes=SQLObject
 
186
 
 
187
# When zope mode is activated, consider the acquired-members option to ignore
 
188
# access to some undefined attributes.
 
189
zope=no
 
190
 
 
191
# List of members which are usually get through zope's acquisition mecanism and
 
192
# so shouldn't trigger E0201 when accessed (need zope=yes to be considered).
 
193
acquired-members=REQUEST,acl_users,aq_parent
 
194
 
 
195
 
 
196
# checks for
 
197
# * unused variables / imports
 
198
# * undefined variables
 
199
# * redefinition of variable from builtins or from an outer scope
 
200
# * use of variable before assigment
 
201
 
202
[VARIABLES]
 
203
 
 
204
# Tells wether we should check for unused import in __init__ files.
 
205
init-import=no
 
206
 
 
207
# A regular expression matching names used for dummy variables (i.e. not used).
 
208
dummy-variables-rgx=_|dummy|unused|.*_unused
 
209
 
 
210
# List of additional names supposed to be defined in builtins. Remember that
 
211
# you should avoid to define new builtins when possible.
 
212
additional-builtins=
 
213
 
 
214
 
 
215
# checks for :
 
216
# * methods without self as first argument
 
217
# * overridden methods signature
 
218
# * access only to existant members via self
 
219
# * attributes not defined in the __init__ method
 
220
# * supported interfaces implementation
 
221
# * unreachable code
 
222
 
223
[CLASSES]
 
224
 
 
225
# List of interface methods to ignore, separated by a comma. This is used for
 
226
# instance to not check methods defines in Zope's Interface base class.
 
227
ignore-iface-methods=isImplementedBy,deferred,extends,names,namesAndDescriptions,queryDescriptionFor,getBases,getDescriptionFor,getDoc,getName,getTaggedValue,getTaggedValueTags,isEqualOrExtendedBy,setTaggedValue,isImplementedByInstancesOf,adaptWith,is_implemented_by
 
228
 
 
229
# List of method names used to declare (i.e. assign) instance attributes.
 
230
defining-attr-methods=__init__,__new__,setUp,reset
 
231
 
 
232
 
 
233
# checks for sign of poor/misdesign:
 
234
# * number of methods, attributes, local variables...
 
235
# * size, complexity of functions, methods
 
236
 
237
[DESIGN]
 
238
 
 
239
# Maximum number of arguments for function / method
 
240
max-args=15
 
241
 
 
242
# Maximum number of locals for function / method body
 
243
max-locals=50
 
244
 
 
245
# Maximum number of return / yield for function / method body
 
246
max-returns=20
 
247
 
 
248
# Maximum number of branch for function / method body
 
249
max-branches=50
 
250
 
 
251
# Maximum number of statements in function / method body
 
252
max-statements=150
 
253
 
 
254
# Maximum number of parents for a class (see R0901).
 
255
max-parents=12
 
256
 
 
257
# Maximum number of attributes for a class (see R0902).
 
258
max-attributes=40
 
259
 
 
260
# Minimum number of public methods for a class (see R0903).
 
261
min-public-methods=0
 
262
 
 
263
# Maximum number of public methods for a class (see R0904).
 
264
max-public-methods=500
 
265
 
 
266
 
 
267
# checks for
 
268
# * external modules dependencies
 
269
# * relative / wildcard imports
 
270
# * cyclic imports
 
271
# * uses of deprecated modules
 
272
 
273
[IMPORTS]
 
274
 
 
275
# Deprecated modules which should not be used, separated by a comma
 
276
deprecated-modules=regsub,string,TERMIOS,Bastion,rexec
 
277
 
 
278
# Create a graph of every (i.e. internal and external) dependencies in the
 
279
# given file (report R0402 must not be disabled)
 
280
import-graph=
 
281
 
 
282
# Create a graph of external dependencies in the given file (report R0402 must
 
283
# not be disabled)
 
284
ext-import-graph=
 
285
 
 
286
# Create a graph of internal dependencies in the given file (report R0402 must
 
287
# not be disabled)
 
288
int-import-graph=
 
289
 
 
290
 
 
291
# checks for :
 
292
# * unauthorized constructions
 
293
# * strict indentation
 
294
# * line length
 
295
# * use of <> instead of !=
 
296
 
297
[FORMAT]
 
298
 
 
299
# Maximum number of characters on a single line.
 
300
max-line-length=100
 
301
 
 
302
# Maximum number of lines in a module
 
303
max-module-lines=10000
 
304
 
 
305
# String used as indentation unit. This is usually " " (4 spaces) or "\t" (1
 
306
# tab).
 
307
indent-string='    '
 
308
 
 
309
 
 
310
# checks for:
 
311
# * warning notes in the code like FIXME, XXX
 
312
# * PEP 263: source code with non ascii character but no encoding declaration
 
313
 
314
[MISCELLANEOUS]
 
315
 
 
316
# List of note tags to take in consideration, separated by a comma.
 
317
notes=FIXME,XXX,TODO
 
318
 
 
319
 
 
320
# checks for similarities and duplicated code. This computation may be
 
321
# memory / CPU intensive, so you should disable it if you experiments some
 
322
# problems.
 
323
 
324
[SIMILARITIES]
 
325
 
 
326
# Minimum lines number of a similarity.
 
327
min-similarity-lines=4
 
328
 
 
329
# Ignore comments when computing similarities.
 
330
ignore-comments=yes
 
331
 
 
332
# Ignore docstrings when computing similarities.
 
333
ignore-docstrings=yes
 
334
 
 
335
#
 
336
# SPELLING
 
337
#
 
338
 
 
339
spelling-dict=en_US
 
340
# pylint doesn't strip the words, so insert a dummy x at the beginning to make
 
341
# the other words work properly.
 
342
# https://bitbucket.org/logilab/pylint/issue/398/spelling-words-need-to-be-stripped-or-the
 
343
spelling-private-dict-file=doc/dict.txt