Home | History | Annotate | Download | only in utils
      1 # Copyright (c) 2013 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 <file or directory> to the black list. It should be a base name, not a
     18 # path. You may set this option multiple times.
     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 
     29 [MESSAGES CONTROL]
     30 
     31 # Disable the message, report, category or checker with the given id(s). You
     32 # can either give multiple identifier separated by comma (,) or put this option
     33 # multiple times (only on the command line, not in the configuration file where
     34 # it should appear only once).
     35 # C0103: Invalid name ""
     36 # C0111: Missing docstring
     37 # C0302: Too many lines in module (N)
     38 # C0321: More than one statement on a single line
     39 # E1103: Instance has no '*' member (but some types could not be inferred)
     40 # I0011: Locally disabling warning.
     41 # R0201: Method could be a function
     42 # R0902: Too many instance attributes (N/7)
     43 # R0903: Too few public methods (N/2)
     44 # R0911: Too many return statements (N/6)
     45 # R0912: Too many branches (N/12)
     46 # R0913: Too many arguments (N/5)
     47 # R0914: Too many local variables (N/15)
     48 # R0915: Too many statements (N/50)
     49 # W0122: Use of the exec statement
     50 # W0141: Used builtin function ''
     51 # W0142: Used * or ** magic
     52 # W0403: Relative import 'constants', should be 'chromite.cbuildbot.constants'
     53 # W0511: Used when a warning note as FIXME or XXX is detected.
     54 # W0703: Catching too general exception Exception.
     55 # R0904: Too many public methods
     56 # R0921: Abstract class not referenced.
     57 # R0922: Abstract class is only referenced N times.
     58 # CHANGE: actual disable string is in run_pylint since the rc file seems to
     59 # have trouble with disabling everything then enabling just one check.
     60 #disable=C0103,C0111,C0302,C0321,E1103,I0011,R0201,R0902,R0903,R0911,R0912,
     61 #R0913,R0914,R0915,W0122,W0141,W0142,W0403,W0511,W0703,R0904,R0921,R0922
     62 
     63 # Enable the message, report, category or checker with the given id(s). You can
     64 # either give multiple identifier separated by comma (,) or put this option
     65 # multiple times.
     66 #enable=W0611
     67 
     68 
     69 [REPORTS]
     70 
     71 # Set the output format. Available formats are text, parseable, colorized, msvs
     72 # (visual studio) and html
     73 #output-format=text
     74 
     75 # Include message's id in output
     76 # CHANGE: Include message ids in output.
     77 include-ids=yes
     78 
     79 # Put messages in a separate file for each module / package specified on the
     80 # command line instead of printing them on stdout. Reports (if any) will be
     81 # written in a file name "pylint_global.[txt|html]".
     82 #files-output=no
     83 
     84 # Tells whether to display a full report or only the messages
     85 # CHANGE: No report.
     86 reports=no
     87 
     88 # Python expression which should return a note less than 10 (10 is the highest
     89 # note). You have access to the variables errors warning, statement which
     90 # respectively contain the number of errors / warnings messages and the total
     91 # number of statements analyzed. This is used by the global evaluation report
     92 # (RP0004).
     93 # all_failures = error + warning + refactor + convention
     94 # evaluation = 10.0 - ((float(5 * all_failures) / statement) * 10)
     95 
     96 # Add a comment according to your evaluation note. This is used by the global
     97 # evaluation report (RP0004).
     98 #comment=no
     99 
    100 
    101 [MISCELLANEOUS]
    102 
    103 # List of note tags to take in consideration, separated by a comma.
    104 #notes=FIXME,XXX,TODO
    105 
    106 
    107 [FORMAT]
    108 
    109 # Maximum number of characters on a single line.
    110 #max-line-length=80
    111 
    112 # Maximum number of lines in a module
    113 #max-module-lines=1000
    114 
    115 # String used as indentation unit. This is usually "    " (4 spaces) or "\t" (1
    116 # tab).
    117 indent-string="    "
    118 
    119 
    120 [TYPECHECK]
    121 
    122 # Tells whether missing members accessed in mixin class should be ignored. A
    123 # mixin class is detected if its name ends with "mixin" (case insensitive).
    124 #ignore-mixin-members=yes
    125 
    126 # List of classes names for which member attributes should not be checked
    127 # (useful for classes with attributes dynamically set).
    128 #ignored-classes=SQLObject
    129 
    130 # When zope mode is activated, add a predefined set of Zope acquired attributes
    131 # to generated-members.
    132 #zope=no
    133 
    134 # List of members which are set dynamically and missed by pylint inference
    135 # system, and so shouldn't trigger E0201 when accessed.
    136 # CHANGE: Added 'AndRaise', 'AndReturn', 'InAnyOrder' and 'MultipleTimes'
    137 #         for pymox.
    138 # CHANGE: Added tempdir for @osutils.TempDirDecorator.
    139 generated-members=REQUEST,acl_users,aq_parent,AndRaise,AndReturn,
    140                   InAnyOrder,MultipleTimes,tempdir
    141 
    142 
    143 [BASIC]
    144 
    145 # Required attributes for module, separated by a comma
    146 #required-attributes=
    147 
    148 # List of builtins function names that should not be used, separated by a comma
    149 #bad-functions=map,filter,apply,input
    150 
    151 # Regular expression which should only match correct module names
    152 #module-rgx=(([a-z_][a-z0-9_]*)|([A-Z][a-zA-Z0-9]+))$
    153 
    154 # Regular expression which should only match correct module level names
    155 #const-rgx=(([A-Z_][A-Z0-9_]*)|(__.*__))$
    156 
    157 # Regular expression which should only match correct class names
    158 #class-rgx=[A-Z_][a-zA-Z0-9]+$
    159 
    160 # Regular expression which should only match correct function names
    161 #
    162 # CHANGE: The ChromiumOS standard is different than PEP-8, so we need to
    163 # redefine this.
    164 #
    165 # Common exceptions to ChromiumOS standard:
    166 # - main: Standard for main function
    167 function-rgx=([A-Z_][a-zA-Z0-9]{2,30}|main)$
    168 
    169 # Regular expression which should only match correct method names
    170 #
    171 # CHANGE: The ChromiumOS standard is different than PEP-8, so we need to
    172 # redefine this. Here's what we allow:
    173 # - CamelCaps, starting with a capital letter.  No underscores in function
    174 #   names.  Can also have a "_" prefix (private method) or a "test" prefix
    175 #   (unit test).
    176 # - Methods that look like __xyz__, which are used to do things like
    177 #   __init__, __del__, etc.
    178 # - setUp, tearDown: For unit tests.
    179 method-rgx=((_|test)?[A-Z][a-zA-Z0-9]{2,30}|__[a-z]+__|setUp|tearDown)$
    180 
    181 # Regular expression which should only match correct instance attribute names
    182 #attr-rgx=[a-z_][a-z0-9_]{2,30}$
    183 
    184 # Regular expression which should only match correct argument names
    185 #argument-rgx=[a-z_][a-z0-9_]{2,30}$
    186 
    187 # Regular expression which should only match correct variable names
    188 #variable-rgx=[a-z_][a-z0-9_]{2,30}$
    189 
    190 # Regular expression which should only match correct list comprehension /
    191 # generator expression variable names
    192 #inlinevar-rgx=[A-Za-z_][A-Za-z0-9_]*$
    193 
    194 # Good variable names which should always be accepted, separated by a comma
    195 #good-names=i,j,k,ex,Run,_
    196 
    197 # Bad variable names which should always be refused, separated by a comma
    198 #bad-names=foo,bar,baz,toto,tutu,tata
    199 
    200 # Regular expression which should only match functions or classes name which do
    201 # not require a docstring
    202 #no-docstring-rgx=__.*__
    203 
    204 
    205 [SIMILARITIES]
    206 
    207 # Minimum lines number of a similarity.
    208 min-similarity-lines=8
    209 
    210 # Ignore comments when computing similarities.
    211 #ignore-comments=yes
    212 
    213 # Ignore docstrings when computing similarities.
    214 #ignore-docstrings=yes
    215 
    216 
    217 [VARIABLES]
    218 
    219 # Tells whether we should check for unused import in __init__ files.
    220 #init-import=no
    221 
    222 # A regular expression matching the beginning of the name of dummy variables
    223 # (i.e. not used).
    224 #dummy-variables-rgx=_|dummy
    225 
    226 # List of additional names supposed to be defined in builtins. Remember that
    227 # you should avoid to define new builtins when possible.
    228 #additional-builtins=
    229 
    230 
    231 [CLASSES]
    232 
    233 # List of interface methods to ignore, separated by a comma. This is used for
    234 # instance to not check methods defines in Zope's Interface base class.
    235 #ignore-iface-methods=isImplementedBy,deferred,extends,names,
    236 #namesAndDescriptions,queryDescriptionFor,getBases,getDescriptionFor,getDoc,
    237 #getName,getTaggedValue,getTaggedValueTags,isEqualOrExtendedBy,setTaggedValue,
    238 #isImplementedByInstancesOf,adaptWith,is_implemented_by
    239 
    240 # List of method names used to declare (i.e. assign) instance attributes.
    241 #defining-attr-methods=__init__,__new__,setUp
    242 
    243 
    244 [DESIGN]
    245 
    246 # Maximum number of arguments for function / method
    247 #max-args=5
    248 
    249 # Argument names that match this expression will be ignored. Default to name
    250 # with leading underscore
    251 #ignored-argument-names=_.*
    252 
    253 # Maximum number of locals for function / method body
    254 #max-locals=15
    255 
    256 # Maximum number of return / yield for function / method body
    257 #max-returns=6
    258 
    259 # Maximum number of branch for function / method body
    260 #max-branchs=12
    261 
    262 # Maximum number of statements in function / method body
    263 #max-statements=50
    264 
    265 # Maximum number of parents for a class (see R0901).
    266 max-parents=10
    267 
    268 # Maximum number of attributes for a class (see R0902).
    269 #max-attributes=7
    270 
    271 # Minimum number of public methods for a class (see R0903).
    272 #min-public-methods=2
    273 
    274 # Maximum number of public methods for a class (see R0904).
    275 #max-public-methods=20
    276 
    277 
    278 [IMPORTS]
    279 
    280 # Deprecated modules which should not be used, separated by a comma
    281 #deprecated-modules=regsub,string,TERMIOS,Bastion,rexec
    282 
    283 # Create a graph of every (i.e. internal and external) dependencies in the
    284 # given file (report RP0402 must not be disabled)
    285 #import-graph=
    286 
    287 # Create a graph of external dependencies in the given file (report RP0402 must
    288 # not be disabled)
    289 #ext-import-graph=
    290 
    291 # Create a graph of internal dependencies in the given file (report RP0402 must
    292 # not be disabled)
    293 #int-import-graph=
    294