Merge mozilla-central to autoland. a=merge CLOSED TREE
[gecko.git] / third_party / libwebrtc / pylintrc_old_style
blob69b599b2f692ee0b96ee41be2fd0be4ad1b33f84
1 # Copyright (c) 2015 The WebRTC project authors. All Rights Reserved.
3 # Use of this source code is governed by a BSD-style license
4 # that can be found in the LICENSE file in the root of the source
5 # tree. An additional intellectual property rights grant can be found
6 # in the file PATENTS.  All contributing project authors may
7 # be found in the AUTHORS file in the root of the source tree.
9 # This file is mostly based on the contents of
10 # https://cs.chromium.org/chromium/tools/depot_tools/pylintrc
11 # and (since the above doesn't properly support naming style checks)
12 # https://cs.chromium.org/chromium/src/third_party/chromite/pylintrc
14 [MESSAGES CONTROL]
16 # Disable the message, report, category or checker with the given id(s).
17 # TODO(kjellander): Reduce this list to as small as possible.
18 disable=
19   E0611,
20   I0010,
21   I0011,
22   W0232,
23   C0413,
24   bad-continuation,
25   broad-except,
26   duplicate-code,
27   eval-used,
28   exec-used,
29   fixme,
30   import-error,
31   import-outside-toplevel,
32   missing-docstring,
33   no-init,
34   no-member,
35   too-few-public-methods,
36   too-many-ancestors,
37   too-many-arguments,
38   too-many-branches,
39   too-many-function-args,
40   too-many-instance-attributes,
41   too-many-lines,
42   too-many-locals,
43   too-many-public-methods,
44   too-many-return-statements,
45   too-many-statements,
48 [REPORTS]
50 # Don't write out full reports, just messages.
51 reports=no
54 [VARIABLES]
56 # Tells whether we should check for unused import in __init__ files.
57 init-import=no
59 # A regular expression matching the beginning of the name of dummy variables
60 # (i.e. not used).
61 dummy-variables-rgx=_|dummy
64 [TYPECHECK]
66 # Tells whether missing members accessed in mixin class should be ignored. A
67 # mixin class is detected if its name ends with "mixin" (case insensitive).
68 ignore-mixin-members=yes
70 # List of classes names for which member attributes should not be checked
71 # (useful for classes with attributes dynamically set).
72 ignored-classes=hashlib,numpy
75 [MISCELLANEOUS]
77 # List of note tags to take in consideration, separated by a comma.
78 notes=FIXME,XXX,TODO
81 [SIMILARITIES]
83 # Minimum lines number of a similarity.
84 min-similarity-lines=4
86 # Ignore comments when computing similarities.
87 ignore-comments=yes
89 # Ignore docstrings when computing similarities.
90 ignore-docstrings=yes
93 [FORMAT]
95 # Maximum number of characters on a single line.
96 max-line-length=80
98 # Maximum number of lines in a module
99 max-module-lines=1000
101 # Use four spaces for indents.
102 # indent-string='    '
105 [BASIC]
107 # List of builtins function names that should not be used, separated by a comma
108 bad-functions=map,filter,apply,input
110 # Regular expression which should only match correct module names
111 module-rgx=(([a-z_][a-z0-9_]*)|([A-Z][a-zA-Z0-9]+))$
113 # Regular expression which should only match correct module level names
114 # (CAPS_WITH_UNDER)
115 const-rgx=(([A-Z_][A-Z0-9_]*)|(__.*__))$
117 # Regular expression which should only match correct class names
118 # (CapWords)
119 class-rgx=[A-Z_][a-zA-Z0-9]+$
121 # Regular expression which should only match correct function names
122 # The Chromium standard is different than PEP-8, so we need to redefine this to
123 # only allow:
124 # - CapWords
125 # - main: Standard for main function.
126 function-rgx=([A-Z_][a-zA-Z0-9]{2,60}|main)$
128 # Regular expression which should only match correct method names
129 # The Chromium standard is different than PEP-8, so we need to redefine this to
130 # only allow:
131 # - CapWords, starting with a capital letter.  No underscores in function
132 #   names.  Can also have a "_" prefix (private method) or a "test" prefix
133 #   (unit test).
134 # - Methods that look like __xyz__, which are used to do things like
135 #   __init__, __del__, etc.
136 # - setUp, tearDown: For unit tests.
137 method-rgx=((_|test)?[A-Z][a-zA-Z0-9]{2,60}|__[a-z]+__|setUp|tearDown)$
139 # Regular expression which should only match correct instance attribute names
140 attr-rgx=[a-z_][a-z0-9_]{2,30}$
142 # Regular expression which should only match correct argument names
143 argument-rgx=[a-z_][a-z0-9_]{2,30}$
145 # Regular expression which should only match correct variable names
146 variable-rgx=[a-z_][a-z0-9_]{0,30}$
148 # Regular expression which should only match correct list comprehension /
149 # generator expression variable names
150 inlinevar-rgx=[A-Za-z_][A-Za-z0-9_]*$
152 # Good variable names which should always be accepted, separated by a comma
153 good-names=i,j,k,ex,Run,_
155 # Bad variable names which should always be refused, separated by a comma
156 bad-names=foo,bar,baz,toto,tutu,tata
158 # Regular expression which should only match functions or classes name which do
159 # not require a docstring
160 no-docstring-rgx=__.*__
163 [DESIGN]
165 # Maximum number of arguments for function / method
166 max-args=5
168 # Argument names that match this expression will be ignored. Default to name
169 # with leading underscore
170 ignored-argument-names=_.*
172 # Maximum number of locals for function / method body
173 max-locals=15
175 # Maximum number of return / yield for function / method body
176 max-returns=6
178 # Maximum number of branch for function / method body
179 max-branchs=12
181 # Maximum number of statements in function / method body
182 max-statements=50
184 # Maximum number of parents for a class (see R0901).
185 max-parents=7
187 # Maximum number of attributes for a class (see R0902).
188 max-attributes=7
190 # Minimum number of public methods for a class (see R0903).
191 min-public-methods=2
193 # Maximum number of public methods for a class (see R0904).
194 max-public-methods=20
197 [CLASSES]
199 # List of method names used to declare (i.e. assign) instance attributes.
200 defining-attr-methods=__init__,__new__,setUp
202 # List of valid names for the first argument in a class method.
203 valid-classmethod-first-arg=cls
206 [IMPORTS]
208 # Deprecated modules which should not be used, separated by a comma
209 deprecated-modules=regsub,TERMIOS,Bastion,rexec
212 [EXCEPTIONS]
214 # Exceptions that will emit a warning when being caught. Defaults to
215 # "Exception"
216 overgeneral-exceptions=Exception