Chromium Code Reviews| Index: pylintrc |
| diff --git a/pylintrc b/pylintrc |
| index b8bea33489f0a68d03b92a8669ab993b435ab6e6..0ee133b2969a06d9f1754d5d76ab703c205214bd 100644 |
| --- a/pylintrc |
| +++ b/pylintrc |
| @@ -1,8 +1,45 @@ |
| +# Copyright (c) 2015 The WebRTC project authors. All Rights Reserved. |
|
janssonWebRTC
2017/03/09 09:22:18
I assume you wrote 2015 since that was the origina
kjellander_webrtc
2017/03/09 09:36:09
Yes.
janssonWebRTC
2017/03/09 10:26:08
Acknowledged.
|
| +# |
| +# Use of this source code is governed by a BSD-style license |
| +# that can be found in the LICENSE file in the root of the source |
| +# tree. An additional intellectual property rights grant can be found |
| +# in the file PATENTS. All contributing project authors may |
| +# be found in the AUTHORS file in the root of the source tree. |
| + |
| + |
|
janssonWebRTC
2017/03/09 09:22:18
Maybe add a comment pointing to the original file
kjellander_webrtc
2017/03/09 09:36:09
Done.
janssonWebRTC
2017/03/09 10:26:08
Acknowledged.
|
| [MESSAGES CONTROL] |
| # Disable the message, report, category or checker with the given id(s). |
| # TODO(kjellander): Reduce this list to as small as possible. |
| -disable=I0010,I0011,bad-continuation,broad-except,duplicate-code,eval-used,exec-used,fixme,invalid-name,missing-docstring,no-init,no-member,too-few-public-methods,too-many-ancestors,too-many-arguments,too-many-branches,too-many-function-args,too-many-instance-attributes,too-many-lines,too-many-locals,too-many-public-methods,too-many-return-statements,too-many-statements |
| +disable= |
| + E0611, |
| + I0010, |
| + I0011, |
| + W0232, |
| + bad-continuation, |
| + bad-inline-option, |
| + broad-except, |
| + duplicate-code, |
| + eval-used, |
| + exec-used, |
| + fixme, |
| + import-error, |
| + locally-disabled, |
| + missing-docstring, |
| + no-init, |
| + no-member, |
| + too-few-public-methods, |
| + too-many-ancestors, |
| + too-many-arguments, |
| + too-many-branches, |
| + too-many-function-args, |
| + too-many-instance-attributes, |
| + too-many-lines, |
| + too-many-locals, |
| + too-many-public-methods, |
| + too-many-return-statements, |
| + too-many-statements, |
| + unused-import, |
| [REPORTS] |
| @@ -11,7 +48,185 @@ disable=I0010,I0011,bad-continuation,broad-except,duplicate-code,eval-used,exec- |
| reports=no |
| +[VARIABLES] |
| + |
| +# Tells whether we should check for unused import in __init__ files. |
| +init-import=no |
| + |
| +# A regular expression matching the beginning of the name of dummy variables |
| +# (i.e. not used). |
| +dummy-variables-rgx=_|dummy |
| + |
| + |
| +[TYPECHECK] |
| + |
| +# Tells whether missing members accessed in mixin class should be ignored. A |
| +# mixin class is detected if its name ends with "mixin" (case insensitive). |
| +ignore-mixin-members=yes |
| + |
| +# List of classes names for which member attributes should not be checked |
| +# (useful for classes with attributes dynamically set). |
| +ignored-classes=hashlib,numpy |
| + |
| + |
| +[MISCELLANEOUS] |
| + |
| +# List of note tags to take in consideration, separated by a comma. |
| +notes=FIXME,XXX,TODO |
| + |
| + |
| +[SIMILARITIES] |
| + |
| +# Minimum lines number of a similarity. |
| +min-similarity-lines=4 |
| + |
| +# Ignore comments when computing similarities. |
| +ignore-comments=yes |
| + |
| +# Ignore docstrings when computing similarities. |
| +ignore-docstrings=yes |
| + |
| + |
| [FORMAT] |
| +# Maximum number of characters on a single line. |
| +max-line-length=80 |
| + |
| +# Maximum number of lines in a module |
| +max-module-lines=1000 |
| + |
| # We use two spaces for indents, instead of the usual four spaces or tab. |
| indent-string=' ' |
| + |
| + |
| +[BASIC] |
| + |
| +# Required attributes for module, separated by a comma |
| +required-attributes= |
|
janssonWebRTC
2017/03/09 09:22:18
This is intentionally empty?
kjellander_webrtc
2017/03/09 09:36:09
Yeah, it's a copy-paste. Let's remove it instead (
janssonWebRTC
2017/03/09 10:26:08
Acknowledged.
|
| + |
| +# List of builtins function names that should not be used, separated by a comma |
| +bad-functions=map,filter,apply,input |
| + |
| +# Regular expression which should only match correct module names |
| +module-rgx=(([a-z_][a-z0-9_]*)|([A-Z][a-zA-Z0-9]+))$ |
| + |
| +# Regular expression which should only match correct module level names |
| +# (CAPS_WITH_UNDER) |
| +const-rgx=(([A-Z_][A-Z0-9_]*)|(__.*__))$ |
| + |
| +# Regular expression which should only match correct class names |
| +# (CapWords) |
| +class-rgx=[A-Z_][a-zA-Z0-9]+$ |
| + |
| +# Regular expression which should only match correct function names |
| +# The Chromium standard is different than PEP-8, so we need to redefine this to |
| +# only allow: |
| +# - CapWords |
| +# - main: Standard for main function. |
| +function-rgx=([A-Z_][a-zA-Z0-9]{2,30}|main)$ |
| + |
| +# Regular expression which should only match correct method names |
| +# The Chromium standard is different than PEP-8, so we need to redefine this to |
| +# only allow: |
| +# - CapWords, starting with a capital letter. No underscores in function |
| +# names. Can also have a "_" prefix (private method) or a "test" prefix |
| +# (unit test). |
| +# - Methods that look like __xyz__, which are used to do things like |
| +# __init__, __del__, etc. |
| +# - setUp, tearDown: For unit tests. |
| +method-rgx=((_|test)?[A-Z][a-zA-Z0-9]{2,60}|__[a-z]+__|setUp|tearDown)$ |
| + |
| +# Regular expression which should only match correct instance attribute names |
| +attr-rgx=[a-z_][a-z0-9_]{2,30}$ |
| + |
| +# Regular expression which should only match correct argument names |
| +argument-rgx=[a-z_][a-z0-9_]{2,30}$ |
| + |
| +# Regular expression which should only match correct variable names |
| +variable-rgx=[a-z_][a-z0-9_]{0,30}$ |
| + |
| +# Regular expression which should only match correct list comprehension / |
| +# generator expression variable names |
| +inlinevar-rgx=[A-Za-z_][A-Za-z0-9_]*$ |
| + |
| +# Good variable names which should always be accepted, separated by a comma |
| +good-names=i,j,k,ex,Run,_ |
| + |
| +# Bad variable names which should always be refused, separated by a comma |
| +bad-names=foo,bar,baz,toto,tutu,tata |
| + |
| +# Regular expression which should only match functions or classes name which do |
| +# not require a docstring |
| +no-docstring-rgx=__.*__ |
| + |
| + |
| +[DESIGN] |
| + |
| +# Maximum number of arguments for function / method |
| +max-args=5 |
| + |
| +# Argument names that match this expression will be ignored. Default to name |
| +# with leading underscore |
| +ignored-argument-names=_.* |
| + |
| +# Maximum number of locals for function / method body |
| +max-locals=15 |
| + |
| +# Maximum number of return / yield for function / method body |
| +max-returns=6 |
| + |
| +# Maximum number of branch for function / method body |
| +max-branchs=12 |
| + |
| +# Maximum number of statements in function / method body |
| +max-statements=50 |
| + |
| +# Maximum number of parents for a class (see R0901). |
| +max-parents=7 |
| + |
| +# Maximum number of attributes for a class (see R0902). |
| +max-attributes=7 |
| + |
| +# Minimum number of public methods for a class (see R0903). |
| +min-public-methods=2 |
| + |
| +# Maximum number of public methods for a class (see R0904). |
| +max-public-methods=20 |
| + |
| + |
| +[CLASSES] |
| + |
| +# List of interface methods to ignore, separated by a comma. This is used for |
| +# instance to not check methods defines in Zope's Interface base class. |
| +ignore-iface-methods=isImplementedBy,deferred,extends,names,namesAndDescriptions,queryDescriptionFor,getBases,getDescriptionFor,getDoc,getName,getTaggedValue,getTaggedValueTags,isEqualOrExtendedBy,setTaggedValue,isImplementedByInstancesOf,adaptWith,is_implemented_by |
|
janssonWebRTC
2017/03/09 09:22:18
Add them on separate lines as you did for disable=
kjellander_webrtc
2017/03/09 09:36:09
I don't have an example of it and I'd rather not s
janssonWebRTC
2017/03/09 10:26:08
Acknowledged.
|
| + |
| +# List of method names used to declare (i.e. assign) instance attributes. |
| +defining-attr-methods=__init__,__new__,setUp |
| + |
| +# List of valid names for the first argument in a class method. |
| +valid-classmethod-first-arg=cls |
| + |
| + |
| +[IMPORTS] |
| + |
| +# Deprecated modules which should not be used, separated by a comma |
| +deprecated-modules=regsub,TERMIOS,Bastion,rexec |
| + |
| +# Create a graph of every (i.e. internal and external) dependencies in the |
| +# given file (report RP0402 must not be disabled) |
| +import-graph= |
|
janssonWebRTC
2017/03/09 09:22:18
This is intentionally empty?
kjellander_webrtc
2017/03/09 09:36:09
Yes, it's the default. I removed it instead.
janssonWebRTC
2017/03/09 10:26:08
Acknowledged.
|
| + |
| +# Create a graph of external dependencies in the given file (report RP0402 must |
| +# not be disabled) |
| +ext-import-graph= |
|
janssonWebRTC
2017/03/09 09:22:18
This is intentionally empty?
kjellander_webrtc
2017/03/09 09:36:09
Yes, it's the default. I removed it instead.
janssonWebRTC
2017/03/09 10:26:08
Acknowledged.
|
| + |
| +# Create a graph of internal dependencies in the given file (report RP0402 must |
| +# not be disabled) |
| +int-import-graph= |
|
janssonWebRTC
2017/03/09 09:22:18
This is intentionally empty?
kjellander_webrtc
2017/03/09 09:36:09
Yes, it's the default. I removed it instead.
janssonWebRTC
2017/03/09 10:26:08
Acknowledged.
|
| + |
| + |
| +[EXCEPTIONS] |
| + |
| +# Exceptions that will emit a warning when being caught. Defaults to |
| +# "Exception" |
| +overgeneral-exceptions=Exception |