1# Copyright 2016 The Android Open Source Project 2# 3# Licensed under the Apache License, Version 2.0 (the "License"); 4# you may not use this file except in compliance with the License. 5# You may obtain a copy of the License at 6# 7# http://www.apache.org/licenses/LICENSE-2.0 8# 9# Unless required by applicable law or agreed to in writing, software 10# distributed under the License is distributed on an "AS IS" BASIS, 11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12# See the License for the specific language governing permissions and 13# limitations under the License. 14 15[MASTER] 16 17# Specify a configuration file. 18#rcfile= 19 20# Python code to execute, usually for sys.path manipulation such as 21# pygtk.require(). 22#init-hook= 23 24# Add files or directories to the blacklist. They should be base names, not 25# paths. 26ignore=CVS,.svn,.git 27 28# Pickle collected data for later comparisons. 29persistent=yes 30 31# List of plugins (as comma separated values of python modules names) to load, 32# usually to register additional checkers. 33load-plugins= 34 pylint.extensions.bad_builtin, 35 pylint.extensions.check_elif, 36 pylint.extensions.docstyle, 37 pylint.extensions.emptystring, 38 pylint.extensions.overlapping_exceptions, 39 pylint.extensions.redefined_variable_type, 40 41# Use multiple processes to speed up Pylint. A value of 0 autodetects available 42# processors. 43jobs=4 44 45# Allow loading of arbitrary C extensions. Extensions are imported into the 46# active Python interpreter and may run arbitrary code. 47unsafe-load-any-extension=no 48 49# A comma-separated list of package or module names from where C extensions may 50# be loaded. Extensions are loading into the active Python interpreter and may 51# run arbitrary code 52extension-pkg-whitelist= 53 54[MESSAGES CONTROL] 55 56# Only show warnings with the listed confidence levels. Leave empty to show 57# all. Valid levels: HIGH, INFERENCE, INFERENCE_FAILURE, UNDEFINED 58confidence= 59 60# Enable the message, report, category or checker with the given id(s). You can 61# either give multiple identifier separated by comma (,) or put this option 62# multiple time. See also the "--disable" option for examples. 63enable= 64 65 66# Disable the message, report, category or checker with the given id(s). You 67# can either give multiple identifiers separated by comma (,) or put this 68# option multiple times (only on the command line, not in the configuration 69# file where it should appear only once).You can also use "--disable=all" to 70# disable everything first and then reenable specific checks. For example, if 71# you want to run only the similarities checker, you can use "--disable=all 72# --enable=similarities". If you want to run only the classes checker, but have 73# no Warning level messages displayed, use"--disable=all --enable=classes 74# --disable=W" 75# We leave many of the style warnings to judgement/peer review. 76# useless-object-inheritance: We disable this for Python 2 compatibility. 77disable= 78 fixme, 79 file-ignored, 80 invalid-name, 81 locally-disabled, 82 missing-docstring, 83 no-else-break, 84 no-else-continue, 85 no-else-raise, 86 no-else-return, 87 too-few-public-methods, 88 too-many-arguments, 89 too-many-branches, 90 too-many-instance-attributes, 91 too-many-lines, 92 too-many-locals, 93 too-many-public-methods, 94 too-many-return-statements, 95 too-many-statements, 96 useless-object-inheritance, 97 98 99[REPORTS] 100 101# Set the output format. Available formats are text, parseable, colorized, msvs 102# (visual studio) and html. You can also give a reporter class, eg 103# mypackage.mymodule.MyReporterClass. 104output-format=text 105 106# Tells whether to display a full report or only the messages 107reports=no 108 109# Activate the evaluation score. 110score=no 111 112# Python expression which should return a note less than 10 (10 is the highest 113# note). You have access to the variables errors warning, statement which 114# respectively contain the number of errors / warnings messages and the total 115# number of statements analyzed. This is used by the global evaluation report 116# (RP0004). 117#evaluation=10.0 - ((float(5 * error + warning + refactor + convention) / statement) * 10) 118 119# Template used to display messages. This is a python new-style format string 120# used to format the message information. See doc for all details 121#msg-template= 122 123 124[SIMILARITIES] 125 126# Minimum lines number of a similarity. 127min-similarity-lines=20 128 129# Ignore comments when computing similarities. 130ignore-comments=yes 131 132# Ignore docstrings when computing similarities. 133ignore-docstrings=yes 134 135# Ignore imports when computing similarities. 136ignore-imports=no 137 138 139[TYPECHECK] 140 141# Tells whether missing members accessed in mixin class should be ignored. A 142# mixin class is detected if its name ends with "mixin" (case insensitive). 143ignore-mixin-members=yes 144 145# List of module names for which member attributes should not be checked 146# (useful for modules/projects where namespaces are manipulated during runtime 147# and thus existing member attributes cannot be deduced by static analysis. It 148# supports qualified module names, as well as Unix pattern matching. 149ignored-modules= 150 151# List of classes names for which member attributes should not be checked 152# (useful for classes with attributes dynamically set). This supports can work 153# with qualified names. 154ignored-classes=hashlib,numpy 155 156# List of members which are set dynamically and missed by pylint inference 157# system, and so shouldn't trigger E1101 when accessed. Python regular 158# expressions are accepted. 159generated-members= 160 161 162[SPELLING] 163 164# Spelling dictionary name. Available dictionaries: none. To make it working 165# install python-enchant package. 166spelling-dict= 167 168# List of comma separated words that should not be checked. 169spelling-ignore-words= 170 171# A path to a file that contains private dictionary; one word per line. 172spelling-private-dict-file= 173 174# Tells whether to store unknown words to indicated private dictionary in 175# --spelling-private-dict-file option instead of raising a message. 176spelling-store-unknown-words=no 177 178 179[LOGGING] 180 181# Logging modules to check that the string format arguments are in logging 182# function parameter format 183logging-modules=logging 184 185 186[VARIABLES] 187 188# Tells whether we should check for unused import in __init__ files. 189init-import=no 190 191# A regular expression matching the name of dummy variables (i.e. expectedly 192# not used). 193dummy-variables-rgx=_|unused_ 194 195# List of additional names supposed to be defined in builtins. Remember that 196# you should avoid to define new builtins when possible. 197additional-builtins= 198 199# List of strings which can identify a callback function by name. A callback 200# name must start or end with one of those strings. 201callbacks=cb_,_cb 202 203 204[FORMAT] 205 206# Maximum number of characters on a single line. 207max-line-length=80 208 209# Regexp for a line that is allowed to be longer than the limit. 210ignore-long-lines=^\s*(# )?<?https?://\S+>?$ 211 212# Allow the body of an if to be on the same line as the test if there is no 213# else. 214single-line-if-stmt=no 215 216# Maximum number of lines in a module 217max-module-lines=1000 218 219# String used as indentation unit. This is usually " " (4 spaces) or "\t" (1 220# tab). 221indent-string=' ' 222 223# Number of spaces of indent required inside a hanging or continued line. 224indent-after-paren=4 225 226# Expected format of line ending, e.g. empty (any line ending), LF or CRLF. 227expected-line-ending-format=LF 228 229 230[MISCELLANEOUS] 231 232# List of note tags to take in consideration, separated by a comma. 233notes=FIXME,XXX,TODO 234 235 236[BASIC] 237 238# List of builtins function names that should not be used, separated by a comma 239bad-functions=map,filter 240 241# Good variable names which should always be accepted, separated by a comma 242good-names=i,j,k,ex,x,_ 243 244# Bad variable names which should always be refused, separated by a comma 245bad-names=foo,bar,baz,toto,tutu,tata 246 247# Colon-delimited sets of names that determine each other's naming style when 248# the name regexes allow several styles. 249name-group= 250 251# Include a hint for the correct naming format with invalid-name 252include-naming-hint=no 253 254# Regular expression matching correct function names 255function-rgx=[a-z_][a-z0-9_]{2,30}$ 256 257# Regular expression matching correct variable names 258variable-rgx=[a-z_][a-z0-9_]{2,30}$ 259 260# Regular expression matching correct constant names 261const-rgx=(([A-Z_][A-Z0-9_]*)|(__.*__))$ 262 263# Regular expression matching correct attribute names 264attr-rgx=[a-z_][a-z0-9_]{2,30}$ 265 266# Regular expression matching correct argument names 267argument-rgx=[a-z_][a-z0-9_]{2,30}$ 268 269# Regular expression matching correct class attribute names 270class-attribute-rgx=([A-Za-z_][A-Za-z0-9_]{2,30}|(__.*__))$ 271 272# Regular expression matching correct inline iteration names 273inlinevar-rgx=[A-Za-z_][A-Za-z0-9_]*$ 274 275# Regular expression matching correct class names 276class-rgx=[A-Z_][a-zA-Z0-9]+$ 277 278# Regular expression matching correct module names 279module-rgx=(([a-z_][a-z0-9_]*)|([A-Z][a-zA-Z0-9]+))$ 280 281# Regular expression which should only match correct method names 282method-rgx=[a-z_][a-z0-9_]{2,30}$ 283 284# Regular expression which should only match function or class names that do 285# not require a docstring. 286no-docstring-rgx=^_ 287 288# Minimum line length for functions/classes that require docstrings, shorter 289# ones are exempt. 290docstring-min-length=10 291 292 293[ELIF] 294 295# Maximum number of nested blocks for function / method body 296max-nested-blocks=5 297 298 299[DESIGN] 300 301# Maximum number of arguments for function / method 302max-args=5 303 304# Argument names that match this expression will be ignored. Default to name 305# with leading underscore 306ignored-argument-names=_.* 307 308# Maximum number of locals for function / method body 309max-locals=15 310 311# Maximum number of return / yield for function / method body 312max-returns=6 313 314# Maximum number of branch for function / method body 315max-branches=12 316 317# Maximum number of statements in function / method body 318max-statements=50 319 320# Maximum number of parents for a class (see R0901). 321max-parents=10 322 323# Maximum number of attributes for a class (see R0902). 324max-attributes=7 325 326# Minimum number of public methods for a class (see R0903). 327min-public-methods=2 328 329# Maximum number of public methods for a class (see R0904). 330max-public-methods=20 331 332# Maximum number of boolean expressions in a if statement 333max-bool-expr=5 334 335 336[CLASSES] 337 338# List of method names used to declare (i.e. assign) instance attributes. 339defining-attr-methods=__init__,__new__,setUp 340 341# List of valid names for the first argument in a class method. 342valid-classmethod-first-arg=cls 343 344# List of valid names for the first argument in a metaclass class method. 345valid-metaclass-classmethod-first-arg=mcs 346 347# List of member names, which should be excluded from the protected access 348# warning. 349exclude-protected=_asdict,_fields,_replace,_source,_make 350 351 352[IMPORTS] 353 354# Deprecated modules which should not be used, separated by a comma 355deprecated-modules=regsub,TERMIOS,Bastion,rexec,optparse 356 357# Create a graph of every (i.e. internal and external) dependencies in the 358# given file (report RP0402 must not be disabled) 359import-graph= 360 361# Create a graph of external dependencies in the given file (report RP0402 must 362# not be disabled) 363ext-import-graph= 364 365# Create a graph of internal dependencies in the given file (report RP0402 must 366# not be disabled) 367int-import-graph= 368 369 370[EXCEPTIONS] 371 372# Exceptions that will emit a warning when being caught. Defaults to 373# "Exception" 374overgeneral-exceptions=builtins.Exception 375