Changeset 1445:52a06a6acf5f


Ignore:
Timestamp:
Oct 20, 2013, 7:34:33 PM (7 years ago)
Author:
Stefan Schwarzer <sschwarzer@…>
Branch:
default
Message:
Use new config file format of PyLint 1.0.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • pylintrc

    r1051 r1445  
    1 # lint Python modules using external checkers.
    2 #
    3 # This is the main checker controling 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 #
    91[MASTER]
    102
     
    1911profile=no
    2012
    21 # Add <file or directory> to the black list. It should be a base name, not a
    22 # path. You may set this option multiple times.
     13# Add files or directories to the blacklist. They should be base names, not
     14# paths.
    2315ignore=CVS
    2416
    2517# Pickle collected data for later comparisons.
    2618persistent=yes
    27 
    28 # Set the cache size for astng objects.
    29 cache-size=500
    3019
    3120# List of plugins (as comma separated values of python modules names) to load,
     
    3625[MESSAGES CONTROL]
    3726
    38 # Enable only checker(s) with the given id(s). This option conflicts with the
    39 # disable-checker option
    40 #enable-checker=
    41 
    42 # Enable all checker(s) except those with the given id(s). This option
    43 # conflicts with the enable-checker option
    44 #disable-checker=
    45 
    46 # Enable all messages in the listed categories.
    47 #enable-msg-cat=
    48 
    49 # Disable all messages in the listed categories.
    50 #disable-msg-cat=
    51 
    52 # Enable the message(s) with the given id(s).
    53 #enable-msg=
    54 
    55 # Disable the message(s) with the given id(s).
    56 # W0142: Used * or ** magic
    57 disable-msg=W0142
     27# Enable the message, report, category or checker with the given id(s). You can
     28# either give multiple identifier separated by comma (,) or put this option
     29# multiple time. See also the "--disable" option for examples.
     30#enable=
     31
     32# Disable the message, report, category or checker with the given id(s). You
     33# can either give multiple identifiers separated by comma (,) or put this
     34# option multiple times (only on the command line, not in the configuration
     35# file where it should appear only once).You can also use "--disable=all" to
     36# disable everything first and then reenable specific checks. For example, if
     37# you want to run only the similarities checker, you can use "--disable=all
     38# --enable=similarities". If you want to run only the classes checker, but have
     39# no Warning level messages displayed, use"--disable=all --enable=classes
     40# --disable=W"
     41#disable=
    5842
    5943
    6044[REPORTS]
    6145
    62 # set the output format. Available formats are text, parseable, colorized, msvs
    63 # (visual studio) and html
     46# Set the output format. Available formats are text, parseable, colorized, msvs
     47# (visual studio) and html. You can also give a reporter class, eg
     48# mypackage.mymodule.MyReporterClass.
    6449output-format=text
    6550
    6651# Include message's id in output
    67 include-ids=yes
     52include-ids=no
     53
     54# Include symbolic ids of messages in output
     55symbols=no
    6856
    6957# Put messages in a separate file for each module / package specified on the
     
    7260files-output=no
    7361
    74 # Tells wether to display a full report or only the messages
     62# Tells whether to display a full report or only the messages
    7563reports=yes
    7664
    7765# Python expression which should return a note less than 10 (10 is the highest
    78 # note).You have access to the variables errors warning, statement which
    79 # respectivly contain the number of errors / warnings messages and the total
     66# note). You have access to the variables errors warning, statement which
     67# respectively contain the number of errors / warnings messages and the total
    8068# number of statements analyzed. This is used by the global evaluation report
    81 # (R0004).
     69# (RP0004).
    8270evaluation=10.0 - ((float(5 * error + warning + refactor + convention) / statement) * 10)
    8371
    8472# Add a comment according to your evaluation note. This is used by the global
    85 # evaluation report (R0004).
    86 comment=yes
    87 
    88 # Enable the report(s) with the given id(s).
    89 #enable-report=
    90 
    91 # Disable the report(s) with the given id(s).
    92 #disable-report=
    93 
    94 
    95 # checks for :
    96 # * doc strings
    97 # * modules / classes / functions / methods / arguments / variables name
    98 # * number of arguments, local variables, branchs, returns and statements in
    99 # functions, methods
    100 # * required module attributes
    101 # * dangerous default values as arguments
    102 # * redefinition of function / method / class
    103 # * uses of the global statement
    104 #
     73# evaluation report (RP0004).
     74comment=no
     75
     76
     77[FORMAT]
     78
     79# Maximum number of characters on a single line.
     80max-line-length=80
     81
     82# Maximum number of lines in a module
     83max-module-lines=1000
     84
     85# String used as indentation unit. This is usually " " (4 spaces) or "\t" (1
     86# tab).
     87indent-string='    '
     88
     89# Regexp for a line that is allowed to be longer than the limit.
     90ignore-long-lines=^\s*(# )?<?https?://\S+>?$
     91
    10592[BASIC]
    10693
    10794# Required attributes for module, separated by a comma
    10895required-attributes=
     96
     97# List of builtins function names that should not be used, separated by a comma
     98bad-functions=map,filter,apply,input
     99
     100# Regular expression which should only match correct module names
     101module-rgx=(([a-z_][a-z0-9_]*)|([A-Z][a-zA-Z0-9]+))$
     102
     103# Regular expression which should only match correct module level names
     104const-rgx=(([A-Z_][A-Z0-9_]*)|(__.*__))$
     105
     106# Regular expression which should only match correct class names
     107class-rgx=[A-Z_][a-zA-Z0-9]+$
     108
     109# Regular expression which should only match correct function names
     110function-rgx=[a-z_][a-z0-9_]{2,30}$
     111
     112# Regular expression which should only match correct method names
     113method-rgx=[a-z_][a-z0-9_]{2,30}$
     114
     115# Regular expression which should only match correct instance attribute names
     116attr-rgx=[a-z_][a-z0-9_]{2,30}$
     117
     118# Regular expression which should only match correct argument names
     119argument-rgx=[a-z_][a-z0-9_]{2,30}$
     120
     121# Regular expression which should only match correct variable names
     122variable-rgx=[a-z_][a-z0-9_]{2,30}$
     123
     124# Regular expression which should only match correct list comprehension /
     125# generator expression variable names
     126inlinevar-rgx=[A-Za-z_][A-Za-z0-9_]*$
     127
     128# Good variable names which should always be accepted, separated by a comma
     129good-names=i,j,k,ex,Run,_
     130
     131# Bad variable names which should always be refused, separated by a comma
     132bad-names=foo,bar,baz,toto,tutu,tata
    109133
    110134# Regular expression which should only match functions or classes name which do
     
    112136no-docstring-rgx=__.*__
    113137
    114 # Regular expression which should only match correct module names
    115 module-rgx=(([a-z_][a-z0-9_]*)|([A-Z][a-zA-Z0-9]+))$
    116 
    117 # Regular expression which should only match correct module level names
    118 const-rgx=(([A-Z_][A-Z1-9_]*)|(__.*__))$
    119 
    120 # Regular expression which should only match correct class names
    121 class-rgx=[A-Z_][a-zA-Z0-9]+$
    122 
    123 # Regular expression which should only match correct function names
    124 function-rgx=[a-z_][a-z0-9_]{2,30}$
    125 
    126 # Regular expression which should only match correct method names
    127 method-rgx=[a-z_][a-z0-9_]{2,30}$
    128 
    129 # Regular expression which should only match correct instance attribute names
    130 attr-rgx=[a-z_][a-z0-9_]{2,30}$
    131 
    132 # Regular expression which should only match correct argument names
    133 argument-rgx=[a-z_][a-z0-9_]{2,30}$
    134 
    135 # Regular expression which should only match correct variable names
    136 variable-rgx=[a-z_][a-z0-9_]{2,30}$
    137 
    138 # Regular expression which should only match correct list comprehension /
    139 # generator expression variable names
    140 inlinevar-rgx=[A-Za-z_][A-Za-z0-9_]*$
    141 
    142 # Good variable names which should always be accepted, separated by a comma
    143 good-names=i,j,k,ex,Run,_
    144 
    145 # Bad variable names which should always be refused, separated by a comma
    146 bad-names=foo,bar,baz,toto,tutu,tata
    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 
    152 # try to find bugs in the code using type inference
    153 #
     138
     139[SIMILARITIES]
     140
     141# Minimum lines number of a similarity.
     142min-similarity-lines=4
     143
     144# Ignore comments when computing similarities.
     145ignore-comments=yes
     146
     147# Ignore docstrings when computing similarities.
     148ignore-docstrings=yes
     149
     150# Ignore imports when computing similarities.
     151ignore-imports=no
     152
     153
     154[MISCELLANEOUS]
     155
     156# List of note tags to take in consideration, separated by a comma.
     157notes=FIXME,XXX,TODO
     158
     159
    154160[TYPECHECK]
    155161
    156 # Tells wether missing members accessed in mixin class should be ignored. A
     162# Tells whether missing members accessed in mixin class should be ignored. A
    157163# mixin class is detected if its name ends with "mixin" (case insensitive).
    158164ignore-mixin-members=yes
    159165
    160166# List of classes names for which member attributes should not be checked
    161 # (useful for classes with attributes dynamicaly set).
     167# (useful for classes with attributes dynamically set).
    162168ignored-classes=SQLObject
    163169
    164 # When zope mode is activated, consider the acquired-members option to ignore
    165 # access to some undefined attributes.
     170# When zope mode is activated, add a predefined set of Zope acquired attributes
     171# to generated-members.
    166172zope=no
    167173
    168 # List of members which are usually get through zope's acquisition mecanism and
    169 # so shouldn't trigger E0201 when accessed (need zope=yes to be considered).
    170 acquired-members=REQUEST,acl_users,aq_parent
    171 
    172 
    173 # checks for
    174 # * unused variables / imports
    175 # * undefined variables
    176 # * redefinition of variable from builtins or from an outer scope
    177 # * use of variable before assigment
    178 #
     174# List of members which are set dynamically and missed by pylint inference
     175# system, and so shouldn't trigger E0201 when accessed. Python regular
     176# expressions are accepted.
     177generated-members=REQUEST,acl_users,aq_parent
     178
     179
    179180[VARIABLES]
    180181
    181 # Tells wether we should check for unused import in __init__ files.
     182# Tells whether we should check for unused import in __init__ files.
    182183init-import=no
    183184
    184 # A regular expression matching names used for dummy variables (i.e. not used).
     185# A regular expression matching the beginning of the name of dummy variables
     186# (i.e. not used).
    185187dummy-variables-rgx=_|dummy
    186188
     
    190192
    191193
    192 # checks for sign of poor/misdesign:
    193 # * number of methods, attributes, local variables...
    194 # * size, complexity of functions, methods
    195 #
     194[IMPORTS]
     195
     196# Deprecated modules which should not be used, separated by a comma
     197deprecated-modules=regsub,string,TERMIOS,Bastion,rexec
     198
     199# Create a graph of every (i.e. internal and external) dependencies in the
     200# given file (report RP0402 must not be disabled)
     201import-graph=
     202
     203# Create a graph of external dependencies in the given file (report RP0402 must
     204# not be disabled)
     205ext-import-graph=
     206
     207# Create a graph of internal dependencies in the given file (report RP0402 must
     208# not be disabled)
     209int-import-graph=
     210
     211
    196212[DESIGN]
    197213
     
    199215max-args=5
    200216
     217# Argument names that match this expression will be ignored. Default to name
     218# with leading underscore
     219ignored-argument-names=_.*
     220
    201221# Maximum number of locals for function / method body
    202222max-locals=15
     
    224244
    225245
    226 # checks for :
    227 # * methods without self as first argument
    228 # * overridden methods signature
    229 # * access only to existant members via self
    230 # * attributes not defined in the __init__ method
    231 # * supported interfaces implementation
    232 # * unreachable code
    233 #
    234246[CLASSES]
    235247
     
    241253defining-attr-methods=__init__,__new__,setUp
    242254
    243 
    244 # checks for
    245 # * external modules dependencies
    246 # * relative / wildcard imports
    247 # * cyclic imports
    248 # * uses of deprecated modules
    249 #
    250 [IMPORTS]
    251 
    252 # Deprecated modules which should not be used, separated by a comma
    253 deprecated-modules=regsub,string,TERMIOS,Bastion,rexec
    254 
    255 # Create a graph of every (i.e. internal and external) dependencies in the
    256 # given file (report R0402 must not be disabled)
    257 import-graph=
    258 
    259 # Create a graph of external dependencies in the given file (report R0402 must
    260 # not be disabled)
    261 ext-import-graph=
    262 
    263 # Create a graph of internal dependencies in the given file (report R0402 must
    264 # not be disabled)
    265 int-import-graph=
    266 
    267 
    268 # checks for :
    269 # * unauthorized constructions
    270 # * strict indentation
    271 # * line length
    272 # * use of <> instead of !=
    273 #
    274 [FORMAT]
    275 
    276 # Maximum number of characters on a single line.
    277 max-line-length=79
    278 
    279 # Maximum number of lines in a module
    280 max-module-lines=1000
    281 
    282 # String used as indentation unit. This is usually " " (4 spaces) or "\t" (1
    283 # tab).
    284 indent-string='    '
    285 
    286 
    287 # checks for similarities and duplicated code. This computation may be
    288 # memory / CPU intensive, so you should disable it if you experiments some
    289 # problems.
    290 #
    291 [SIMILARITIES]
    292 
    293 # Minimum lines number of a similarity.
    294 min-similarity-lines=4
    295 
    296 # Ignore comments when computing similarities.
    297 ignore-comments=yes
    298 
    299 # Ignore docstrings when computing similarities.
    300 ignore-docstrings=yes
    301 
    302 
    303 # checks for:
    304 # * warning notes in the code like FIXME, XXX
    305 # * PEP 263: source code with non ascii character but no encoding declaration
    306 #
    307 [MISCELLANEOUS]
    308 
    309 # List of note tags to take in consideration, separated by a comma.
    310 notes=FIXME,XXX,TODO
     255# List of valid names for the first argument in a class method.
     256valid-classmethod-first-arg=cls
     257
     258# List of valid names for the first argument in a metaclass class method.
     259valid-metaclass-classmethod-first-arg=mcs
     260
     261
     262[EXCEPTIONS]
     263
     264# Exceptions that will emit a warning when being caught. Defaults to
     265# "Exception"
     266overgeneral-exceptions=Exception
Note: See TracChangeset for help on using the changeset viewer.