Home | History | Annotate | Download | only in boto
      1 # lint Python modules using external checkers.
      2 # 
      3 # This is the main checker controlling the other ones and the reports
      4 # generation. It is itself both a raw checker and an astng checker in order
      5 # to:
      6 # * handle message activation / deactivation at the module level
      7 # * handle some basic but necessary stats'data (number of classes, methods...)
      8 # 
      9 [MASTER]
     10 
     11 
     12 # Specify a configuration file.
     13 #rcfile=
     14 
     15 # Profiled execution.
     16 profile=no
     17 
     18 # Add <file or directory> to the black list. It should be a base name, not a
     19 # path. You may set this option multiple times.
     20 ignore=.svn
     21 
     22 # Pickle collected data for later comparisons.
     23 persistent=yes
     24 
     25 # Set the cache size for astng objects.
     26 cache-size=500
     27 
     28 # List of plugins (as comma separated values of python modules names) to load,
     29 # usually to register additional checkers.
     30 load-plugins=
     31 
     32 
     33 [MESSAGES CONTROL]
     34 
     35 # Enable only checker(s) with the given id(s). This option conflict with the
     36 # disable-checker option
     37 #enable-checker=
     38 
     39 # Enable all checker(s) except those with the given id(s). This option conflict
     40 # with the disable-checker option
     41 #disable-checker=
     42 
     43 # Enable all messages in the listed categories.
     44 #enable-msg-cat=
     45 
     46 # Disable all messages in the listed categories.
     47 #disable-msg-cat=
     48 
     49 # Enable the message(s) with the given id(s).
     50 #enable-msg=
     51 
     52 # Disable the message(s) with the given id(s).
     53 # disable-msg=C0323,W0142,C0301,C0103,C0111,E0213,C0302,C0203,W0703,R0201
     54 disable-msg=C0301,C0111,C0103,R0201,W0702,C0324
     55 
     56 [REPORTS]
     57 
     58 # set the output format. Available formats are text, parseable, colorized and
     59 # html
     60 output-format=colorized
     61 
     62 # Include message's id in output
     63 include-ids=yes
     64 
     65 # Put messages in a separate file for each module / package specified on the
     66 # command line instead of printing them on stdout. Reports (if any) will be
     67 # written in a file name "pylint_global.[txt|html]".
     68 files-output=no
     69 
     70 # Tells wether to display a full report or only the messages
     71 reports=yes
     72 
     73 # Python expression which should return a note less than 10 (10 is the highest
     74 # note).You have access to the variables errors warning, statement which
     75 # respectivly contain the number of errors / warnings messages and the total
     76 # number of statements analyzed. This is used by the global evaluation report
     77 # (R0004).
     78 evaluation=10.0 - ((float(5 * error + warning + refactor + convention) / statement) * 10)
     79 
     80 # Add a comment according to your evaluation note. This is used by the global
     81 # evaluation report (R0004).
     82 comment=no
     83 
     84 # Enable the report(s) with the given id(s).
     85 #enable-report=
     86 
     87 # Disable the report(s) with the given id(s).
     88 #disable-report=
     89 
     90 # checks for
     91 # * unused variables / imports
     92 # * undefined variables
     93 # * redefinition of variable from builtins or from an outer scope
     94 # * use of variable before assigment
     95 # 
     96 [VARIABLES]
     97 
     98 # Tells wether we should check for unused import in __init__ files.
     99 init-import=yes
    100 
    101 # A regular expression matching names used for dummy variables (i.e. not used).
    102 dummy-variables-rgx=_|dummy
    103 
    104 # List of additional names supposed to be defined in builtins. Remember that
    105 # you should avoid to define new builtins when possible.
    106 additional-builtins=
    107 
    108 
    109 # try to find bugs in the code using type inference
    110 # 
    111 [TYPECHECK]
    112 
    113 # Tells wether missing members accessed in mixin class should be ignored. A
    114 # mixin class is detected if its name ends with "mixin" (case insensitive).
    115 ignore-mixin-members=yes
    116 
    117 # When zope mode is activated, consider the acquired-members option to ignore
    118 # access to some undefined attributes.
    119 zope=no
    120 
    121 # List of members which are usually get through zope's acquisition mecanism and
    122 # so shouldn't trigger E0201 when accessed (need zope=yes to be considered).
    123 acquired-members=REQUEST,acl_users,aq_parent
    124 
    125 
    126 # checks for :
    127 # * doc strings
    128 # * modules / classes / functions / methods / arguments / variables name
    129 # * number of arguments, local variables, branches, returns and statements in
    130 # functions, methods
    131 # * required module attributes
    132 # * dangerous default values as arguments
    133 # * redefinition of function / method / class
    134 # * uses of the global statement
    135 # 
    136 [BASIC]
    137 
    138 # Required attributes for module, separated by a comma
    139 required-attributes=
    140 
    141 # Regular expression which should only match functions or classes name which do
    142 # not require a docstring
    143 no-docstring-rgx=__.*__
    144 
    145 # Regular expression which should only match correct module names
    146 module-rgx=(([a-z_][a-z0-9_]*)|([A-Z][a-zA-Z0-9]+))$
    147 
    148 # Regular expression which should only match correct module level names
    149 const-rgx=(([A-Z_][A-Z1-9_]*)|(__.*__))$
    150 
    151 # Regular expression which should only match correct class names
    152 class-rgx=[A-Z_][a-zA-Z0-9]+$
    153 
    154 # Regular expression which should only match correct function names
    155 function-rgx=[a-z_][a-z0-9_]{2,30}$
    156 
    157 # Regular expression which should only match correct method names
    158 method-rgx=[a-z_][a-z0-9_]{2,30}$
    159 
    160 # Regular expression which should only match correct instance attribute names
    161 attr-rgx=[a-z_][a-z0-9_]{2,30}$
    162 
    163 # Regular expression which should only match correct argument names
    164 argument-rgx=[a-z_][a-z0-9_]{2,30}$
    165 
    166 # Regular expression which should only match correct variable names
    167 variable-rgx=[a-z_][a-z0-9_]{2,30}$
    168 
    169 # Regular expression which should only match correct list comprehension /
    170 # generator expression variable names
    171 inlinevar-rgx=[A-Za-z_][A-Za-z0-9_]*$
    172 
    173 # Good variable names which should always be accepted, separated by a comma
    174 good-names=i,j,k,ex,Run,_
    175 
    176 # Bad variable names which should always be refused, separated by a comma
    177 bad-names=foo,bar,baz,toto,tutu,tata
    178 
    179 # List of builtins function names that should not be used, separated by a comma
    180 bad-functions=apply,input
    181 
    182 
    183 # checks for sign of poor/misdesign:
    184 # * number of methods, attributes, local variables...
    185 # * size, complexity of functions, methods
    186 # 
    187 [DESIGN]
    188 
    189 # Maximum number of arguments for function / method
    190 max-args=12
    191 
    192 # Maximum number of locals for function / method body
    193 max-locals=30
    194 
    195 # Maximum number of return / yield for function / method body
    196 max-returns=12
    197 
    198 # Maximum number of branch for function / method body
    199 max-branchs=30
    200 
    201 # Maximum number of statements in function / method body
    202 max-statements=60
    203 
    204 # Maximum number of parents for a class (see R0901).
    205 max-parents=7
    206 
    207 # Maximum number of attributes for a class (see R0902).
    208 max-attributes=20
    209 
    210 # Minimum number of public methods for a class (see R0903).
    211 min-public-methods=0
    212 
    213 # Maximum number of public methods for a class (see R0904).
    214 max-public-methods=20
    215 
    216 
    217 # checks for
    218 # * external modules dependencies
    219 # * relative / wildcard imports
    220 # * cyclic imports
    221 # * uses of deprecated modules
    222 # 
    223 [IMPORTS]
    224 
    225 # Deprecated modules which should not be used, separated by a comma
    226 deprecated-modules=regsub,string,TERMIOS,Bastion,rexec
    227 
    228 # Create a graph of every (i.e. internal and external) dependencies in the
    229 # given file (report R0402 must not be disabled)
    230 import-graph=
    231 
    232 # Create a graph of external dependencies in the given file (report R0402 must
    233 # not be disabled)
    234 ext-import-graph=
    235 
    236 # Create a graph of internal dependencies in the given file (report R0402 must
    237 # not be disabled)
    238 int-import-graph=
    239 
    240 
    241 # checks for :
    242 # * methods without self as first argument
    243 # * overridden methods signature
    244 # * access only to existant members via self
    245 # * attributes not defined in the __init__ method
    246 # * supported interfaces implementation
    247 # * unreachable code
    248 # 
    249 [CLASSES]
    250 
    251 # List of interface methods to ignore, separated by a comma. This is used for
    252 # instance to not check methods defines in Zope's Interface base class.
    253 # ignore-iface-methods=isImplementedBy,deferred,extends,names,namesAndDescriptions,queryDescriptionFor,getBases,getDescriptionFor,getDoc,getName,getTaggedValue,getTaggedValueTags,isEqualOrExtendedBy,setTaggedValue,isImplementedByInstancesOf,adaptWith,is_implemented_by
    254 
    255 # List of method names used to declare (i.e. assign) instance attributes.
    256 defining-attr-methods=__init__,__new__,setUp
    257 
    258 
    259 # checks for similarities and duplicated code. This computation may be
    260 # memory / CPU intensive, so you should disable it if you experiments some
    261 # problems.
    262 # 
    263 [SIMILARITIES]
    264 
    265 # Minimum lines number of a similarity.
    266 min-similarity-lines=5
    267 
    268 # Ignore comments when computing similarities.
    269 ignore-comments=yes
    270 
    271 # Ignore docstrings when computing similarities.
    272 ignore-docstrings=yes
    273 
    274 
    275 # checks for:
    276 # * warning notes in the code like FIXME, XXX
    277 # * PEP 263: source code with non ascii character but no encoding declaration
    278 # 
    279 [MISCELLANEOUS]
    280 
    281 # List of note tags to take in consideration, separated by a comma.
    282 notes=FIXME,XXX,TODO,BUG:
    283 
    284 
    285 # checks for :
    286 # * unauthorized constructions
    287 # * strict indentation
    288 # * line length
    289 # * use of <> instead of !=
    290 # 
    291 [FORMAT]
    292 
    293 # Maximum number of characters on a single line.
    294 max-line-length=80
    295 
    296 # Maximum number of lines in a module
    297 max-module-lines=1000
    298 
    299 # String used as indentation unit. This is usually " " (4 spaces) or "\t" (1
    300 # tab).
    301 indent-string='    '
    302