OXYGENHUB
◆ main openmsx / build / pylintrc
8.8 KiB · last changed chore(): initial commit 1 month ago source blame history raw
1
# 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
# 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=design
45
46
# Enable all messages in the listed categories (IRCWEF).
47
#enable-msg-cat=
48
49
# Disable all messages in the listed categories (IRCWEF).
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=C0111,W0142,R0201
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=yes
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
# try to find bugs in the code using type inference
95
#
96
[TYPECHECK]
97
98
# Tells wether missing members accessed in mixin class should be ignored. A
99
# mixin class is detected if its name ends with "mixin" (case insensitive).
100
ignore-mixin-members=yes
101
102
# List of classes names for which member attributes should not be checked
103
# (useful for classes with attributes dynamicaly set).
104
ignored-classes=SQLObject
105
106
# When zope mode is activated, add a predefined set of Zope acquired attributes
107
# to generated-members.
108
zope=no
109
110
# List of members which are set dynamically and missed by pylint inference
111
# system, and so shouldn't trigger E0201 when accessed.
112
generated-members=REQUEST,acl_users,aq_parent
113
114
115
# checks for :
116
# * doc strings
117
# * modules / classes / functions / methods / arguments / variables name
118
# * number of arguments, local variables, branchs, returns and statements in
119
# functions, methods
120
# * required module attributes
121
# * dangerous default values as arguments
122
# * redefinition of function / method / class
123
# * uses of the global statement
124
#
125
[BASIC]
126
127
# Required attributes for module, separated by a comma
128
required-attributes=
129
130
# Regular expression which should only match functions or classes name which do
131
# not require a docstring
132
no-docstring-rgx=__.*__
133
134
# Regular expression which should only match correct module names
135
module-rgx=([a-z_][a-z0-9_]*)$
136
137
# Regular expression which should only match correct module level names
138
const-rgx=([a-z_][A-Za-z_]*)$
139
140
# Regular expression which should only match correct class names
141
class-rgx=[A-Z_][A-Za-z0-9_]+$
142
143
# Regular expression which should only match correct function names
144
function-rgx=[a-z_][A-Za-z_]{2,30}$
145
146
# Regular expression which should only match correct method names
147
method-rgx=([a-z_][A-Za-z_]{2,30})|(on_[a-z_][A-Za-z_]{2,30}_[a-z_][A-Za-z_]{2,30})$
148
149
# Regular expression which should only match correct instance attribute names
150
attr-rgx=[a-z_][A-Za-z_]{2,30}$
151
152
# Regular expression which should only match correct argument names
153
argument-rgx=[a-z_][A-Za-z_]{1,30}$
154
155
# Regular expression which should only match correct variable names
156
variable-rgx=[a-z_][A-Za-z0-9_]{1,30}$
157
158
# Regular expression which should only match correct list comprehension /
159
# generator expression variable names
160
inlinevar-rgx=[a-z_][A-Za-z_]*$
161
162
# Good variable names which should always be accepted, separated by a comma
163
good-names=i,j,k,ex,Run,_
164
165
# Bad variable names which should always be refused, separated by a comma
166
bad-names=foo,bar,baz,toto,tutu,tata
167
168
# List of builtins function names that should not be used, separated by a comma
169
bad-functions=map,filter,apply,input
170
171
172
# checks for
173
# * unused variables / imports
174
# * undefined variables
175
# * redefinition of variable from builtins or from an outer scope
176
# * use of variable before assigment
177
#
178
[VARIABLES]
179
180
# Tells wether we should check for unused import in __init__ files.
181
init-import=no
182
183
# A regular expression matching names used for dummy variables (i.e. not used).
184
dummy-variables-rgx=(.*)_|dummy
185
186
# List of additional names supposed to be defined in builtins. Remember that
187
# you should avoid to define new builtins when possible.
188
additional-builtins=
189
190
191
# checks for
192
# * external modules dependencies
193
# * relative / wildcard imports
194
# * cyclic imports
195
# * uses of deprecated modules
196
#
197
[IMPORTS]
198
199
# Deprecated modules which should not be used, separated by a comma
200
deprecated-modules=regsub,string,TERMIOS,Bastion,rexec
201
202
# Create a graph of every (i.e. internal and external) dependencies in the
203
# given file (report R0402 must not be disabled)
204
import-graph=
205
206
# Create a graph of external dependencies in the given file (report R0402 must
207
# not be disabled)
208
ext-import-graph=
209
210
# Create a graph of internal dependencies in the given file (report R0402 must
211
# not be disabled)
212
int-import-graph=
213
214
215
# checks for sign of poor/misdesign:
216
# * number of methods, attributes, local variables...
217
# * size, complexity of functions, methods
218
#
219
[DESIGN]
220
221
# Maximum number of arguments for function / method
222
max-args=5
223
224
# Maximum number of locals for function / method body
225
max-locals=15
226
227
# Maximum number of return / yield for function / method body
228
max-returns=6
229
230
# Maximum number of branch for function / method body
231
max-branchs=12
232
233
# Maximum number of statements in function / method body
234
max-statements=50
235
236
# Maximum number of parents for a class (see R0901).
237
max-parents=7
238
239
# Maximum number of attributes for a class (see R0902).
240
max-attributes=7
241
242
# Minimum number of public methods for a class (see R0903).
243
min-public-methods=2
244
245
# Maximum number of public methods for a class (see R0904).
246
max-public-methods=20
247
248
249
# checks for :
250
# * methods without self as first argument
251
# * overridden methods signature
252
# * access only to existant members via self
253
# * attributes not defined in the __init__ method
254
# * supported interfaces implementation
255
# * unreachable code
256
#
257
[CLASSES]
258
259
# List of interface methods to ignore, separated by a comma. This is used for
260
# instance to not check methods defines in Zope's Interface base class.
261
ignore-iface-methods=isImplementedBy,deferred,extends,names,namesAndDescriptions,queryDescriptionFor,getBases,getDescriptionFor,getDoc,getName,getTaggedValue,getTaggedValueTags,isEqualOrExtendedBy,setTaggedValue,isImplementedByInstancesOf,adaptWith,is_implemented_by
262
263
# List of method names used to declare (i.e. assign) instance attributes.
264
defining-attr-methods=__init__,__new__,setUp
265
266
267
# checks for:
268
# * warning notes in the code like FIXME, XXX
269
# * PEP 263: source code with non ascii character but no encoding declaration
270
#
271
[MISCELLANEOUS]
272
273
# List of note tags to take in consideration, separated by a comma.
274
notes=FIXME,XXX,TODO
275
276
277
# checks for :
278
# * unauthorized constructions
279
# * strict indentation
280
# * line length
281
# * use of <> instead of !=
282
#
283
[FORMAT]
284
285
# Maximum number of characters on a single line.
286
max-line-length=80
287
288
# Maximum number of lines in a module
289
max-module-lines=1000
290
291
# String used as indentation unit. This is usually " " (4 spaces) or "\t" (1
292
# tab).
293
indent-string=\t
294
295
296
# checks for similarities and duplicated code. This computation may be
297
# memory / CPU intensive, so you should disable it if you experiments some
298
# problems.
299
#
300
[SIMILARITIES]
301
302
# Minimum lines number of a similarity.
303
min-similarity-lines=4
304
305
# Ignore comments when computing similarities.
306
ignore-comments=yes
307
308
# Ignore docstrings when computing similarities.
309
ignore-docstrings=yes