Chih-Yu Huang | b87649e | 2015-09-17 13:09:21 +0800 | [diff] [blame] | 1 | # Copyright (c) 2015 The Chromium OS Authors. All rights reserved. |
| 2 | # Use of this source code is governed by a BSD-style license that can be |
| 3 | # found in the LICENSE file. |
| 4 | |
| 5 | [MASTER] |
| 6 | |
| 7 | # Specify a configuration file. |
| 8 | #rcfile= |
| 9 | |
| 10 | # Python code to execute, usually for sys.path manipulation such as |
| 11 | # pygtk.require(). |
| 12 | #init-hook= |
| 13 | |
| 14 | # Profiled execution. |
| 15 | #profile=no |
| 16 | |
| 17 | # Add files or directories to the blacklist. They should be base names, not |
| 18 | # paths. |
| 19 | #ignore=CVS |
| 20 | |
| 21 | # Pickle collected data for later comparisons. |
| 22 | #persistent=yes |
| 23 | |
| 24 | # List of plugins (as comma separated values of python modules names) to load, |
| 25 | # usually to register additional checkers. |
| 26 | load-plugins= |
| 27 | |
| 28 | # DEPRECATED |
| 29 | #include-ids=no |
| 30 | |
| 31 | # DEPRECATED |
| 32 | #symbols=no |
| 33 | |
| 34 | # Use multiple processes to speed up Pylint. |
| 35 | #jobs=1 |
| 36 | |
| 37 | # Allow loading of arbitrary C extensions. Extensions are imported into the |
| 38 | # active Python interpreter and may run arbitrary code. |
| 39 | #unsafe-load-any-extension=no |
| 40 | |
| 41 | # A comma-separated list of package or module names from where C extensions may |
| 42 | # be loaded. Extensions are loading into the active Python interpreter and may |
| 43 | # run arbitrary code |
| 44 | #extension-pkg-whitelist= |
| 45 | |
| 46 | |
| 47 | [MESSAGES CONTROL] |
| 48 | |
| 49 | # Only show warnings with the listed confidence levels. Leave empty to show |
| 50 | # all. Valid levels: HIGH, INFERENCE, INFERENCE_FAILURE, UNDEFINED |
| 51 | #confidence= |
| 52 | |
| 53 | # Enable the message, report, category or checker with the given id(s). You can |
| 54 | # either give multiple identifier separated by comma (,) or put this option |
| 55 | # multiple time. See also the "--disable" option for examples. |
| 56 | #enable= |
| 57 | |
| 58 | # Disable the message, report, category or checker with the given id(s). You |
| 59 | # can either give multiple identifier separated by comma (,) or put this option |
| 60 | # multiple times (only on the command line, not in the configuration file where |
| 61 | # it should appear only once). |
| 62 | # C0111: Missing docstring |
| 63 | # C0302: Too many lines in module (N) |
| 64 | # E1002: Use of super on an old style class |
| 65 | # E1103: Instance has no '*' member (but some types could not be inferred) |
| 66 | # I0011: Locally disabling warning. |
| 67 | # I0012: Locally enabling warning. |
| 68 | # R0201: Method could be a function |
| 69 | # R0902: Too many instance attributes (N/7) |
| 70 | # R0903: Too few public methods (N/2) |
| 71 | # R0911: Too many return statements (N/6) |
| 72 | # R0912: Too many branches (N/12) |
| 73 | # R0913: Too many arguments (N/5) |
| 74 | # R0914: Too many local variables (N/15) |
| 75 | # R0915: Too many statements (N/50) |
| 76 | # W0122: Use of the exec statement |
| 77 | # W0141: Used builtin function '' |
| 78 | # W0142: Used * or ** magic |
| 79 | # W0403: Relative import 'constants', should be 'chromite.cbuildbot.constants' |
| 80 | # W0511: Used when a warning note as FIXME or XXX is detected. |
| 81 | # W0703: Catching too general exception Exception. |
| 82 | # R0904: Too many public methods |
| 83 | # R0921: Abstract class not referenced. |
| 84 | # R0922: Abstract class is only referenced N times. |
| 85 | # R0801, W0105: Added for factory repo only. |
| 86 | disable=C0111,C0302,E1002,E1103,I0011,I0012,R0201,R0902,R0903,R0911,R0912,R0913,R0914,R0915,W0122,W0141,W0142,W0403,W0511,W0703,R0904,R0921,R0922,R0801,W0105 |
| 87 | |
| 88 | |
| 89 | [REPORTS] |
| 90 | |
| 91 | # Set the output format. Available formats are text, parseable, colorized, msvs |
| 92 | # (visual studio) and html. You can also give a reporter class, eg |
| 93 | # mypackage.mymodule.MyReporterClass. |
| 94 | #output-format=text |
| 95 | |
| 96 | # Put messages in a separate file for each module / package specified on the |
| 97 | # command line instead of printing them on stdout. Reports (if any) will be |
| 98 | # written in a file name "pylint_global.[txt|html]". |
| 99 | #files-output=no |
| 100 | |
| 101 | # Tells whether to display a full report or only the messages |
| 102 | reports=no |
| 103 | |
| 104 | # Python expression which should return a note less than 10 (10 is the highest |
| 105 | # note). You have access to the variables errors warning, statement which |
| 106 | # respectively contain the number of errors / warnings messages and the total |
| 107 | # number of statements analyzed. This is used by the global evaluation report |
| 108 | # (RP0004). |
| 109 | #evaluation=10.0 - ((float(5 * error + warning + refactor + convention) / statement) * 10) |
| 110 | |
| 111 | # Add a comment according to your evaluation note. This is used by the global |
| 112 | # evaluation report (RP0004). |
| 113 | #comment=no |
| 114 | |
| 115 | # Template used to display messages. This is a python new-style format string |
| 116 | # used to format the message information. See doc for all details |
| 117 | #msg-template= |
| 118 | |
| 119 | |
| 120 | [MISCELLANEOUS] |
| 121 | |
| 122 | # List of note tags to take in consideration, separated by a comma. |
| 123 | #notes=FIXME,XXX,TODO |
| 124 | |
| 125 | |
| 126 | [LOGGING] |
| 127 | |
| 128 | # Logging modules to check that the string format arguments are in logging |
| 129 | # function parameter format |
| 130 | logging-modules=logging |
| 131 | |
| 132 | |
| 133 | |
| 134 | [FORMAT] |
| 135 | |
| 136 | # Maximum number of characters on a single line. |
| 137 | max-line-length=80 |
| 138 | |
| 139 | # Maximum number of lines in a module |
| 140 | #max-module-lines=1000 |
| 141 | |
| 142 | # String used as indentation unit. This is usually " " (4 spaces) or "\t" (1 |
| 143 | # tab). |
| 144 | # CHANGE: Use " " instead. |
| 145 | indent-string=' ' |
| 146 | |
| 147 | # Allow the body of an if to be on the same line as the test if there is no |
| 148 | # else. |
| 149 | single-line-if-stmt=no |
| 150 | |
| 151 | # List of optional constructs for which whitespace checking is disabled |
| 152 | #no-space-check=trailing-comma,dict-separator |
| 153 | |
| 154 | # Maximum number of lines in a module |
| 155 | #max-module-lines=1000 |
| 156 | |
| 157 | # Number of spaces of indent required inside a hanging or continued line. |
| 158 | #indent-after-paren=4 |
| 159 | |
| 160 | # Expected format of line ending, e.g. empty (any line ending), LF or CRLF. |
| 161 | #expected-line-ending-format= |
| 162 | |
| 163 | |
| 164 | [TYPECHECK] |
| 165 | |
| 166 | # Tells whether missing members accessed in mixin class should be ignored. A |
| 167 | # mixin class is detected if its name ends with "mixin" (case insensitive). |
| 168 | #ignore-mixin-members=yes |
| 169 | |
| 170 | # List of module names for which member attributes should not be checked |
| 171 | # (useful for modules/projects where namespaces are manipulated during runtime |
| 172 | # and thus existing member attributes cannot be deduced by static analysis |
| 173 | ignored-modules= |
| 174 | |
| 175 | # List of classes names for which member attributes should not be checked |
| 176 | # (useful for classes with attributes dynamically set). |
| 177 | #ignored-classes=SQLObject |
| 178 | |
| 179 | # When zope mode is activated, add a predefined set of Zope acquired attributes |
| 180 | # to generated-members. |
| 181 | #zope=no |
| 182 | |
| 183 | # List of members which are set dynamically and missed by pylint inference |
| 184 | # system, and so shouldn't trigger E0201 when accessed. Python regular |
| 185 | # expressions are accepted. |
| 186 | #generated-members=REQUEST,acl_users,aq_parent |
| 187 | |
| 188 | |
| 189 | |
| 190 | [BASIC] |
| 191 | |
| 192 | # Required attributes for module, separated by a comma |
| 193 | #required-attributes= |
| 194 | |
| 195 | # List of builtins function names that should not be used, separated by a comma |
| 196 | #bad-functions=map,filter,apply,input |
| 197 | |
| 198 | # Regular expression which should only match correct module names |
| 199 | module-rgx=(([a-z_][a-z0-9_]*)|([A-Z][a-zA-Z0-9]+))$ |
| 200 | |
| 201 | # Regular expression which should only match correct module level names |
| 202 | #const-rgx=(([A-Z_][A-Z0-9_]*)|(__.*__))$ |
| 203 | |
| 204 | # Regular expression which should only match correct class names |
| 205 | class-rgx=[A-Z_][a-zA-Z0-9]+$ |
| 206 | |
| 207 | # Regular expression which should only match correct function names |
| 208 | # |
| 209 | # CHANGE: The ChromiumOS standard is different than PEP-8, so we need to |
| 210 | # redefine this. |
| 211 | # |
| 212 | # Common exceptions to ChromiumOS standard: |
| 213 | # - main: Standard for main function |
| 214 | function-rgx=([A-Z_][a-zA-Z0-9]{2,30}|main)$ |
| 215 | |
| 216 | # Regular expression which should only match correct method names |
| 217 | # |
| 218 | # CHANGE: The ChromiumOS standard is different than PEP-8, so we need to |
| 219 | # redefine this. Here's what we allow: |
| 220 | # - CamelCaps, starting with a capital letter. No underscores in function |
| 221 | # names. Can also have a "_" prefix (private method) or a "test" prefix |
| 222 | # (unit test). |
| 223 | # - Methods that look like __xyz__, which are used to do things like |
| 224 | # __init__, __del__, etc. |
| 225 | # - setUp, tearDown: For unit tests. |
| 226 | method-rgx=((_|test)?[A-Z][a-zA-Z0-9]{2,30}|__[a-z]+__|setUp|tearDown)$ |
| 227 | |
| 228 | # Regular expression which should only match correct instance attribute names |
| 229 | attr-rgx=[a-z_][a-z0-9_]{1,30}$ |
| 230 | |
| 231 | # Regular expression which should only match correct argument names |
| 232 | #argument-rgx=[a-z_][a-z0-9_]{2,30}$ |
| 233 | |
| 234 | # Regular expression which should only match correct variable names |
Chih-Yu Huang | 3708122 | 2017-02-20 12:31:17 +0800 | [diff] [blame] | 235 | variable-rgx=([a-z_][a-z0-9_]{2,30}|[A-Z_][A-Z0-9_]{2,30})$ |
Chih-Yu Huang | b87649e | 2015-09-17 13:09:21 +0800 | [diff] [blame] | 236 | |
| 237 | # Regular expression which should only match correct list comprehension / |
| 238 | # generator expression variable names |
| 239 | #inlinevar-rgx=[A-Za-z_][A-Za-z0-9_]*$ |
| 240 | |
| 241 | # Good variable names which should always be accepted, separated by a comma |
Chih-Yu Huang | 24c80d4 | 2015-09-18 16:39:34 +0800 | [diff] [blame] | 242 | good-names=f,i,j,k,ex,Run,_,ret |
Chih-Yu Huang | b87649e | 2015-09-17 13:09:21 +0800 | [diff] [blame] | 243 | |
| 244 | # Bad variable names which should always be refused, separated by a comma |
| 245 | #bad-names=foo,bar,baz,toto,tutu,tata |
| 246 | |
| 247 | # Regular expression which should only match functions or classes name which do |
| 248 | # not require a docstring |
| 249 | #no-docstring-rgx=__.*__ |
| 250 | |
| 251 | |
| 252 | [SIMILARITIES] |
| 253 | |
| 254 | # Minimum lines number of a similarity. |
| 255 | min-similarity-lines=20 |
| 256 | |
| 257 | # Ignore comments when computing similarities. |
| 258 | #gnore-comments=yes |
| 259 | |
| 260 | # Ignore docstrings when computing similarities. |
| 261 | #ignore-docstrings=yes |
| 262 | |
| 263 | # Ignore imports when computing similarities. |
| 264 | #ignore-imports=no |
| 265 | |
| 266 | |
| 267 | [VARIABLES] |
| 268 | |
| 269 | # Tells whether we should check for unused import in __init__ files. |
| 270 | #init-import=no |
| 271 | |
| 272 | # A regular expression matching the name of dummy variables (i.e. expectedly |
| 273 | # not used). |
| 274 | dummy-variables-rgx=_|unused_ |
| 275 | |
| 276 | # List of additional names supposed to be defined in builtins. Remember that |
| 277 | # you should avoid to define new builtins when possible. |
| 278 | #additional-builtins= |
| 279 | |
| 280 | # List of strings which can identify a callback function by name. A callback |
| 281 | # name must start or end with one of those strings. |
| 282 | #callbacks=cb_,_cb |
| 283 | |
| 284 | |
| 285 | [CLASSES] |
| 286 | |
| 287 | # List of interface methods to ignore, separated by a comma. This is used for |
| 288 | # instance to not check methods defines in Zope's Interface base class. |
| 289 | #ignore-iface-methods=isImplementedBy,deferred,extends,names,namesAndDescriptions,queryDescriptionFor,getBases,getDescriptionFor,getDoc,getName,getTaggedValue,getTaggedValueTags,isEqualOrExtendedBy,setTaggedValue,isImplementedByInstancesOf,adaptWith,is_implemented_by |
| 290 | |
| 291 | # List of method names used to declare (i.e. assign) instance attributes. |
| 292 | #defining-attr-methods=__init__,__new__,setUp |
| 293 | |
| 294 | # List of valid names for the first argument in a class method. |
| 295 | #valid-classmethod-first-arg=cls |
| 296 | |
| 297 | # List of valid names for the first argument in a metaclass class method. |
| 298 | #valid-metaclass-classmethod-first-arg=mcs |
| 299 | |
| 300 | # List of member names, which should be excluded from the protected access |
| 301 | # warning. |
| 302 | #exclude-protected=_asdict,_fields,_replace,_source,_make |
| 303 | |
| 304 | |
| 305 | [DESIGN] |
| 306 | |
| 307 | # Maximum number of arguments for function / method |
| 308 | #max-args=5 |
| 309 | |
| 310 | # Argument names that match this expression will be ignored. Default to name |
| 311 | # with leading underscore |
| 312 | #ignored-argument-names=_.* |
| 313 | |
| 314 | # Maximum number of locals for function / method body |
| 315 | #max-locals=15 |
| 316 | |
| 317 | # Maximum number of return / yield for function / method body |
| 318 | #max-returns=6 |
| 319 | |
| 320 | # Maximum number of branch for function / method body |
| 321 | #max-branches=12 |
| 322 | |
| 323 | # Maximum number of statements in function / method body |
| 324 | #max-statements=50 |
| 325 | |
| 326 | # Maximum number of parents for a class (see R0901). |
| 327 | max-parents=10 |
| 328 | |
| 329 | # Maximum number of attributes for a class (see R0902). |
| 330 | #max-attributes=7 |
| 331 | |
| 332 | # Minimum number of public methods for a class (see R0903). |
| 333 | #min-public-methods=2 |
| 334 | |
| 335 | # Maximum number of public methods for a class (see R0904). |
| 336 | #max-public-methods=20 |
| 337 | |
| 338 | |
| 339 | [IMPORTS] |
| 340 | |
| 341 | # Deprecated modules which should not be used, separated by a comma |
| 342 | #deprecated-modules=regsub,TERMIOS,Bastion,rexec |
| 343 | |
| 344 | # Create a graph of every (i.e. internal and external) dependencies in the |
| 345 | # given file (report RP0402 must not be disabled) |
| 346 | #import-graph= |
| 347 | |
| 348 | # Create a graph of external dependencies in the given file (report RP0402 must |
| 349 | # not be disabled) |
| 350 | #ext-import-graph= |
| 351 | |
| 352 | # Create a graph of internal dependencies in the given file (report RP0402 must |
| 353 | # not be disabled) |
| 354 | #int-import-graph= |
| 355 | |
| 356 | |
| 357 | |
| 358 | [EXCEPTIONS] |
| 359 | |
| 360 | # Exceptions that will emit a warning when being caught. Defaults to |
| 361 | # "Exception" |
| 362 | overgeneral-exceptions=Exception |