Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

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