Merge Debian packaging for release “4.2+dfsg.1-2”.
[debian_python-coverage.git] / pylintrc
blob39d231c19001e147596c8991c7cc2e5519f43646
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
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]
14 # Specify a configuration file.
15 #rcfile=
17 # Python code to execute, usually for sys.path manipulation such as
18 # pygtk.require().
19 #init-hook=
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=
25 # Pickle collected data for later comparisons.
26 persistent=no
28 # Set the cache size for astng objects.
29 cache-size=500
31 # List of plugins (as comma separated values of python modules names) to load,
32 # usually to register additional checkers.
33 load-plugins=
36 [MESSAGES CONTROL]
38 # Enable only checker(s) with the given id(s). This option conflicts with the
39 # disable-checker option
40 #enable-checker=
42 # Enable all checker(s) except those with the given id(s). This option
43 # conflicts with the enable-checker option
44 #disable-checker=
46 # Enable all messages in the listed categories.
47 #enable-msg-cat=
49 # Disable all messages in the listed categories.
50 #disable-msg-cat=
52 # Enable the message(s) with the given id(s).
53 enable=
54     useless-suppression
56 # Disable the message(s) with the given id(s).
57 disable= 
58     spelling,
59 # Messages that are just silly:
60     locally-disabled,
61     exec-used,
62     no-init,
63     bad-whitespace,
64     global-statement,
65     broad-except,
66 # Messages that may be silly:
67     no-self-use,
68     no-member,
69     using-constant-test,
70     too-many-nested-blocks,
71 # Formatting stuff
72     superfluous-parens,bad-continuation,
73 # I'm fine deciding my own import order,
74     wrong-import-position,
75     wrong-import-order,
76 # Messages that are noisy for now, eventually maybe we'll turn them on:
77     invalid-name,
78     protected-access,
79     duplicate-code,
80     cyclic-import
82 msg-template={path}:{line}: {msg} ({symbol})
84 [REPORTS]
86 # set the output format. Available formats are text, parseable, colorized, msvs
87 # (visual studio) and html
88 output-format=text
90 # Put messages in a separate file for each module / package specified on the
91 # command line instead of printing them on stdout. Reports (if any) will be
92 # written in a file name "pylint_global.[txt|html]".
93 files-output=no
95 # Tells wether to display a full report or only the messages
96 reports=no
98 # Python expression which should return a note less than 10 (10 is the highest
99 # note).You have access to the variables errors warning, statement which
100 # respectivly contain the number of errors / warnings messages and the total
101 # number of statements analyzed. This is used by the global evaluation report
102 # (R0004).
103 evaluation=10.0 - ((float(5 * error + warning + refactor + convention) / statement) * 10)
105 # Enable the report(s) with the given id(s).
106 #enable-report=
108 # Disable the report(s) with the given id(s).
109 #disable-report=
112 # checks for :
113 # * doc strings
114 # * modules / classes / functions / methods / arguments / variables name
115 # * number of arguments, local variables, branchs, returns and statements in
116 # functions, methods
117 # * required module attributes
118 # * dangerous default values as arguments
119 # * redefinition of function / method / class
120 # * uses of the global statement
122 [BASIC]
124 # Regular expression which should only match functions or classes name which do
125 # not require a docstring
126 # Special methods don't: __foo__
127 # Test methods don't: testXXXX
128 # TestCase overrides don't: setUp, tearDown
129 # Dispatched methods don't: _xxx__Xxxx
130 no-docstring-rgx=__.*__|test[A-Z_].*|setUp|tearDown|_.*__.*
132 # Regular expression which should only match correct module names
133 module-rgx=(([a-z_][a-z0-9_]*)|([A-Z][a-zA-Z0-9]+))$
135 # Regular expression which should only match correct module level names
136 const-rgx=(([A-Z_][A-Z0-9_]*)|(__.*__))$
138 # Regular expression which should only match correct class names
139 class-rgx=[A-Z_][a-zA-Z0-9]+$
141 # Regular expression which should only match correct function names
142 function-rgx=[a-z_][a-z0-9_]{2,30}$
144 # Regular expression which should only match correct method names
145 method-rgx=[a-z_][a-z0-9_]{2,30}$|setUp|tearDown|test_.*
147 # Regular expression which should only match correct instance attribute names
148 attr-rgx=[a-z_][a-z0-9_]{2,30}$
150 # Regular expression which should only match correct argument names
151 argument-rgx=[a-z_][a-z0-9_]{2,30}$
153 # Regular expression which should only match correct variable names
154 variable-rgx=[a-z_][a-z0-9_]{2,30}$
156 # Regular expression which should only match correct list comprehension /
157 # generator expression variable names
158 inlinevar-rgx=[A-Za-z_][A-Za-z0-9_]*$
160 # Good variable names which should always be accepted, separated by a comma
161 good-names=i,j,k,ex,Run,_
163 # Bad variable names which should always be refused, separated by a comma
164 bad-names=foo,bar,baz,toto,tutu,tata
166 # List of builtins function names that should not be used, separated by a comma
167 bad-functions=
170 # try to find bugs in the code using type inference
172 [TYPECHECK]
174 # Tells wether missing members accessed in mixin class should be ignored. A
175 # mixin class is detected if its name ends with "mixin" (case insensitive).
176 ignore-mixin-members=yes
178 # List of classes names for which member attributes should not be checked
179 # (useful for classes with attributes dynamicaly set).
180 ignored-classes=SQLObject
182 # List of members which are usually get through zope's acquisition mecanism and
183 # so shouldn't trigger E0201 when accessed (need zope=yes to be considered).
184 acquired-members=REQUEST,acl_users,aq_parent
187 # checks for
188 # * unused variables / imports
189 # * undefined variables
190 # * redefinition of variable from builtins or from an outer scope
191 # * use of variable before assigment
193 [VARIABLES]
195 # Tells wether we should check for unused import in __init__ files.
196 init-import=no
198 # A regular expression matching names used for dummy variables (i.e. not used).
199 dummy-variables-rgx=_|dummy|unused|.*_unused
201 # List of additional names supposed to be defined in builtins. Remember that
202 # you should avoid to define new builtins when possible.
203 additional-builtins=
206 # checks for :
207 # * methods without self as first argument
208 # * overridden methods signature
209 # * access only to existant members via self
210 # * attributes not defined in the __init__ method
211 # * supported interfaces implementation
212 # * unreachable code
214 [CLASSES]
216 # List of method names used to declare (i.e. assign) instance attributes.
217 defining-attr-methods=__init__,__new__,setUp,reset
220 # checks for sign of poor/misdesign:
221 # * number of methods, attributes, local variables...
222 # * size, complexity of functions, methods
224 [DESIGN]
226 # Maximum number of arguments for function / method
227 max-args=15
229 # Maximum number of locals for function / method body
230 max-locals=50
232 # Maximum number of return / yield for function / method body
233 max-returns=20
235 # Maximum number of branch for function / method body
236 max-branches=50
238 # Maximum number of statements in function / method body
239 max-statements=150
241 # Maximum number of parents for a class (see R0901).
242 max-parents=12
244 # Maximum number of attributes for a class (see R0902).
245 max-attributes=40
247 # Minimum number of public methods for a class (see R0903).
248 min-public-methods=0
250 # Maximum number of public methods for a class (see R0904).
251 max-public-methods=500
254 # checks for
255 # * external modules dependencies
256 # * relative / wildcard imports
257 # * cyclic imports
258 # * uses of deprecated modules
260 [IMPORTS]
262 # Deprecated modules which should not be used, separated by a comma
263 deprecated-modules=regsub,string,TERMIOS,Bastion,rexec
265 # Create a graph of every (i.e. internal and external) dependencies in the
266 # given file (report R0402 must not be disabled)
267 import-graph=
269 # Create a graph of external dependencies in the given file (report R0402 must
270 # not be disabled)
271 ext-import-graph=
273 # Create a graph of internal dependencies in the given file (report R0402 must
274 # not be disabled)
275 int-import-graph=
278 # checks for :
279 # * unauthorized constructions
280 # * strict indentation
281 # * line length
282 # * use of <> instead of !=
284 [FORMAT]
286 # Maximum number of characters on a single line.
287 max-line-length=100
289 # Maximum number of lines in a module
290 max-module-lines=10000
292 # String used as indentation unit. This is usually " " (4 spaces) or "\t" (1
293 # tab).
294 indent-string='    '
297 # checks for:
298 # * warning notes in the code like FIXME, XXX
299 # * PEP 263: source code with non ascii character but no encoding declaration
301 [MISCELLANEOUS]
303 # List of note tags to take in consideration, separated by a comma.
304 notes=FIXME,XXX,TODO
307 # checks for similarities and duplicated code. This computation may be
308 # memory / CPU intensive, so you should disable it if you experiments some
309 # problems.
311 [SIMILARITIES]
313 # Minimum lines number of a similarity.
314 min-similarity-lines=4
316 # Ignore comments when computing similarities.
317 ignore-comments=yes
319 # Ignore docstrings when computing similarities.
320 ignore-docstrings=yes
323 # SPELLING
326 spelling-dict=en_US
327 # pylint doesn't strip the words, so insert a dummy x at the beginning to make
328 # the other words work properly.
329 # https://bitbucket.org/logilab/pylint/issue/398/spelling-words-need-to-be-stripped-or-the
330 spelling-private-dict-file=doc/dict.txt