Debian Codegraph @

utils/pylintrc

raw
1 # File copied from:
2 # http://src.chromium.org/chrome/trunk/tools/depot_tools/pylintrc
3 # Date: 2013-06-29.
4 [MASTER]
5
6 # Specify a configuration file.
7 #rcfile=
8
9 # Python code to execute, usually for sys.path manipulation such as
10 # pygtk.require().
11 #init-hook=
12
13 # Profiled execution.
14 profile=no
15
16 # Add files or directories to the blacklist. They should be base names, not
17 # paths.
18 ignore=CVS
19
20 # Pickle collected data for later comparisons.
21 persistent=yes
22
23 # List of plugins (as comma separated values of python modules names) to load,
24 # usually to register additional checkers.
25 load-plugins=
26
27
28 [MESSAGES CONTROL]
29
30 # Enable the message, report, category or checker with the given id(s). You can
31 # either give multiple identifier separated by comma (,) or put this option
32 # multiple time.
33 #enable=
34
35 # Disable the message, report, category or checker with the given id(s). You
36 # can either give multiple identifier separated by comma (,) or put this option
37 # multiple time (only on the command line, not in the configuration file where
38 # it should appear only once).
39 # CHANGED:
40 # C0103: Invalid name ""
41 # C0111: Missing docstring
42 # C0302: Too many lines in module (N)
43 #
44 # F0401: Unable to import 'module'
45 # pylint acting strangely: plaso/lib/event.py: F0401: 26,0: Unable to import 'google.protobuf'
46 #
47 # I0010: Unable to consider inline option ''
48 # I0011: Locally disabling WNNNN
49 #
50 # R0201: Method could be a function
51 # R0801: Similar lines in N files
52 # R0901: Too many ancestors (8/7)
53 # R0902: Too many instance attributes (N/7)
54 # R0903: Too few public methods (N/2)
55 # R0904: Too many public methods (N/20)
56 # R0911: Too many return statements (N/6)
57 # R0912: Too many branches (N/12)
58 # R0913: Too many arguments (N/5)
59 # R0914: Too many local variables (N/15)
60 # R0915: Too many statements (N/50)
61 # R0921: Abstract class not referenced
62 # R0922: Abstract class is only referenced 1 times
63 # W0122: Use of the exec statement
64 # W0141: Used builtin function ''
65 # W0142: Used * or ** magic
66 # W0201: Variables defined initially outside the scope of __init__ (reconsider this, added by Kristinn).
67 # W0212: Locally enabling protected-access
68 # W0402: Uses of a deprecated module 'string'
69 # W0404: 41: Reimport 'XX' (imported line NN)
70 # W0511: TODO
71 # W0603: Using the global statement
72 # W0703: Catch "Exception"
73 # W1201: Specify string format arguments as logging function parameters
74 # W1202: Use % formatting in logging functions but pass the % parameters as arguments
75 disable=C0103,C0111,C0302,F0401,I0010,I0011,R0201,R0801,R0901,R0902,R0903,R0904,R0911,R0912,R0913,R0914,R0915,R0921,R0922,W0122,W0141,W0142,W0201,W0212,W0402,W0404,W0511,W0603,W0703,W1201,W1202
76
77
78 [REPORTS]
79
80 # Set the output format. Available formats are text, parseable, colorized, msvs
81 # (visual studio) and html
82 output-format=text
83
84 # Put messages in a separate file for each module / package specified on the
85 # command line instead of printing them on stdout. Reports (if any) will be
86 # written in a file name "pylint_global.[txt|html]".
87 files-output=no
88
89 # Tells whether to display a full report or only the messages
90 # CHANGED:
91 reports=no
92
93 # Python expression which should return a note less than 10 (10 is the highest
94 # note). You have access to the variables errors warning, statement which
95 # respectively contain the number of errors / warnings messages and the total
96 # number of statements analyzed. This is used by the global evaluation report
97 # (RP0004).
98 evaluation=10.0 - ((float(5 * error + warning + refactor + convention) / statement) * 10)
99
100 # Add a comment according to your evaluation note. This is used by the global
101 # evaluation report (RP0004).
102 comment=no
103
104
105 [VARIABLES]
106
107 # Tells whether we should check for unused import in __init__ files.
108 init-import=no
109
110 # A regular expression matching the beginning of the name of unused variables.
111 # By default this is _ and dummy but we prefer _ and unused.
112 dummy-variables-rgx=_|unused
113
114 # List of additional names supposed to be defined in builtins. Remember that
115 # you should avoid to define new builtins when possible.
116 additional-builtins=
117
118
119 [TYPECHECK]
120
121 # Tells whether missing members accessed in mixin class should be ignored. A
122 # mixin class is detected if its name ends with "mixin" (case insensitive).
123 ignore-mixin-members=yes
124
125 # List of classes names for which member attributes should not be checked
126 # (useful for classes with attributes dynamically set).
127 ignored-classes=SQLObject,twisted.internet.reactor,hashlib,google.appengine.api.memcache
128
129 # When zope mode is activated, add a predefined set of Zope acquired attributes
130 # to generated-members.
131 zope=no
132
133 # List of members which are set dynamically and missed by pylint inference
134 # system, and so shouldn't trigger E0201 when accessed. Python regular
135 # expressions are accepted.
136 generated-members=REQUEST,acl_users,aq_parent,multiprocessing.managers.SyncManager
137
138
139 [MISCELLANEOUS]
140
141 # List of note tags to take in consideration, separated by a comma.
142 notes=FIXME,XXX,TODO
143
144
145 [SIMILARITIES]
146
147 # Minimum lines number of a similarity.
148 min-similarity-lines=4
149
150 # Ignore comments when computing similarities.
151 ignore-comments=yes
152
153 # Ignore docstrings when computing similarities.
154 ignore-docstrings=yes
155
156
157 [FORMAT]
158
159 # Maximum number of characters on a single line.
160 max-line-length=80
161
162 # Maximum number of lines in a module
163 max-module-lines=1000
164
165 # String used as indentation unit. This is usually " " (4 spaces) or "\t" (1
166 # tab).
167 # CHANGED:
168 indent-string=' '
169
170
171 [BASIC]
172
173 # Required attributes for module, separated by a comma
174 required-attributes=
175
176 # List of builtins function names that should not be used, separated by a comma
177 bad-functions=map,filter,apply,input
178
179 # Regular expression which should only match correct module names
180 module-rgx=(([a-z_][a-z0-9_]*)|([A-Z][a-zA-Z0-9]+))$
181
182 # Regular expression which should only match correct module level names
183 const-rgx=(([A-Z_][A-Z0-9_]*)|(__.*__))$
184
185 # Regular expression which should only match correct class names
186 class-rgx=[A-Z_][a-zA-Z0-9]+$
187
188 # Regular expression which should only match correct function names
189 function-rgx=[a-z_][a-z0-9_]{2,30}$
190
191 # Regular expression which should only match correct method names
192 method-rgx=[a-z_][a-z0-9_]{2,30}$
193
194 # Regular expression which should only match correct instance attribute names
195 attr-rgx=[a-z_][a-z0-9_]{2,30}$
196
197 # Regular expression which should only match correct argument names
198 argument-rgx=[a-z_][a-z0-9_]{2,30}$
199
200 # Regular expression which should only match correct variable names
201 variable-rgx=[a-z_][a-z0-9_]{2,30}$
202
203 # Regular expression which should only match correct list comprehension /
204 # generator expression variable names
205 inlinevar-rgx=[A-Za-z_][A-Za-z0-9_]*$
206
207 # Good variable names which should always be accepted, separated by a comma
208 good-names=i,j,k,ex,Run,_
209
210 # Bad variable names which should always be refused, separated by a comma
211 bad-names=foo,bar,baz,toto,tutu,tata
212
213 # Regular expression which should only match functions or classes name which do
214 # not require a docstring
215 no-docstring-rgx=__.*__
216
217
218 [DESIGN]
219
220 # Maximum number of arguments for function / method
221 max-args=5
222
223 # Argument names that match this expression will be ignored. Default to name
224 # with leading underscore
225 ignored-argument-names=_.*
226
227 # Maximum number of locals for function / method body
228 max-locals=15
229
230 # Maximum number of return / yield for function / method body
231 max-returns=6
232
233 # Maximum number of branch for function / method body
234 max-branchs=12
235
236 # Maximum number of statements in function / method body
237 max-statements=50
238
239 # Maximum number of parents for a class (see R0901).
240 max-parents=7
241
242 # Maximum number of attributes for a class (see R0902).
243 max-attributes=7
244
245 # Minimum number of public methods for a class (see R0903).
246 min-public-methods=2
247
248 # Maximum number of public methods for a class (see R0904).
249 max-public-methods=20
250
251
252 [CLASSES]
253
254 # List of interface methods to ignore, separated by a comma. This is used for
255 # instance to not check methods defines in Zope's Interface base class.
256 ignore-iface-methods=isImplementedBy,deferred,extends,names,namesAndDescriptions,queryDescriptionFor,getBases,getDescriptionFor,getDoc,getName,getTaggedValue,getTaggedValueTags,isEqualOrExtendedBy,setTaggedValue,isImplementedByInstancesOf,adaptWith,is_implemented_by
257
258 # List of method names used to declare (i.e. assign) instance attributes.
259 defining-attr-methods=__init__,__new__,setUp
260
261 # List of valid names for the first argument in a class method.
262 valid-classmethod-first-arg=cls
263
264
265 [IMPORTS]
266
267 # Deprecated modules which should not be used, separated by a comma
268 deprecated-modules=regsub,string,TERMIOS,Bastion,rexec
269
270 # Create a graph of every (i.e. internal and external) dependencies in the
271 # given file (report RP0402 must not be disabled)
272 import-graph=
273
274 # Create a graph of external dependencies in the given file (report RP0402 must
275 # not be disabled)
276 ext-import-graph=
277
278 # Create a graph of internal dependencies in the given file (report RP0402 must
279 # not be disabled)
280 int-import-graph=
281
282
283 [EXCEPTIONS]
284
285 # Exceptions that will emit a warning when being caught. Defaults to
286 # "Exception"
287 overgeneral-exceptions=Exception