xen-vtx-unstable

annotate tools/python/pylintrc @ 6774:4d899a738d59

merge?
author cl349@firebug.cl.cam.ac.uk
date Tue Sep 13 15:05:49 2005 +0000 (2005-09-13)
parents 64d6de1ea743
children e7c7196fa329 8ca0f98ba8e2
rev   line source
ewan@6766 1 # lint Python modules using external checkers.
ewan@6766 2 #
ewan@6766 3 # This is the main checker controling the other ones and the reports
ewan@6766 4 # generation. It is itself both a raw checker and an astng checker in order
ewan@6766 5 # to:
ewan@6766 6 # * handle message activation / deactivation at the module level
ewan@6766 7 # * handle some basic but necessary stats'data (number of classes, methods...)
ewan@6766 8 #
ewan@6766 9 # This checker also defines the following reports:
ewan@6766 10 # * R0001: Total errors / warnings
ewan@6766 11 # * R0002: % errors / warnings by module
ewan@6766 12 # * R0003: Messages
ewan@6766 13 # * R0004: Global evaluation
ewan@6766 14 #
ewan@6766 15 [MASTER]
ewan@6766 16 # Add <file or directory> to the black list. It should be a base name, not a
ewan@6766 17 # path. You may set this option multiple times.
ewan@6766 18 ignore=CVS
ewan@6766 19
ewan@6766 20 # Pickle collected data for later comparisons.
ewan@6766 21 persistent=yes
ewan@6766 22
ewan@6766 23 # Set the cache size for astng objects.
ewan@6766 24 cache-size=500
ewan@6766 25
ewan@6766 26
ewan@6766 27
ewan@6766 28 [REPORTS]
ewan@6766 29 # Tells wether to display a full report or only the messages
ewan@6766 30 reports=yes
ewan@6766 31
ewan@6766 32 # Use HTML as output format instead of text
ewan@6766 33 html=no
ewan@6766 34
ewan@6766 35 # Use a parseable text output format, so your favorite text editor will be able
ewan@6766 36 # to jump to the line corresponding to a message.
ewan@6766 37 parseable=no
ewan@6766 38
ewan@6766 39 # Colorizes text output using ansi escape codes
ewan@6766 40 color=no
ewan@6766 41
ewan@6766 42 # Put messages in a separate file for each module / package specified on the
ewan@6766 43 # command line instead of printing them on stdout. Reports (if any) will be
ewan@6766 44 # written in a file name "pylint_global.[txt|html]".
ewan@6766 45 files-output=no
ewan@6766 46
ewan@6766 47 # Python expression which should return a note less than 10 (10 is the highest
ewan@6766 48 # note).You have access to the variables errors warning, statement which
ewan@6766 49 # respectivly contain the number of errors / warnings messages and the total
ewan@6766 50 # number of statements analyzed. This is used by the global evaluation report
ewan@6766 51 # (R0004).
ewan@6766 52 evaluation=10.0 - ((float(5 * error + warning + refactor + convention) / statement) * 10)
ewan@6766 53
ewan@6766 54 # Add a comment according to your evaluation note. This is used by the global
ewan@6766 55 # evaluation report (R0004).
ewan@6766 56 comment=no
ewan@6766 57
ewan@6766 58 # Include message's id in output
ewan@6766 59 include-ids=yes
ewan@6766 60
ewan@6766 61
ewan@6766 62
ewan@6766 63 # checks for
ewan@6766 64 # * unused variables / imports
ewan@6766 65 # * undefined variables
ewan@6766 66 # * redefinition of variable from builtins or from an outer scope
ewan@6766 67 # * use of variable before assigment
ewan@6766 68 #
ewan@6766 69 [VARIABLES]
ewan@6766 70 # Enable / disable this checker
ewan@6766 71 enable-variables=yes
ewan@6766 72
ewan@6766 73 # Tells wether we should check for unused import in __init__ files.
ewan@6766 74 init-import=no
ewan@6766 75
ewan@6766 76 # List of variable names used for dummy variables (i.e. not used).
ewan@6766 77 dummy-variables=_,dummy
ewan@6766 78
ewan@6766 79
ewan@6766 80
ewan@6766 81 # checks for :
ewan@6766 82 # * doc strings
ewan@6766 83 # * modules / classes / functions / methods / arguments / variables name
ewan@6766 84 # * number of arguments, local variables, branchs, returns and statements in
ewan@6766 85 # functions, methods
ewan@6766 86 # * required module attributes
ewan@6766 87 # * dangerous default values as arguments
ewan@6766 88 # * redefinition of function / method / class
ewan@6766 89 # * uses of the global statement
ewan@6766 90 #
ewan@6766 91 # This checker also defines the following reports:
ewan@6766 92 # * R0101: Statistics by type
ewan@6766 93 #
ewan@6766 94 [BASIC]
ewan@6766 95 # Enable / disable this checker
ewan@6766 96 enable-basic=yes
ewan@6766 97
ewan@6766 98 # Required attributes for module, separated by a comma
ewan@6766 99 required-attributes=
ewan@6766 100
ewan@6766 101 # Regular expression which should only match functions or classes name which do
ewan@6766 102 # not require a docstring
ewan@6766 103 no-docstring-rgx=.*
ewan@6766 104
ewan@6766 105 # Minimal length for module / class / function / method / argument / variable
ewan@6766 106 # names
ewan@6766 107 min-name-length=1
ewan@6766 108
ewan@6766 109 # Regular expression which should only match correct module names
ewan@6766 110 module-rgx=(([a-z_][a-z0-9_]*)|([A-Z][a-zA-Z0-9]+))$
ewan@6766 111
ewan@6766 112 # Regular expression which should only match correct class names
ewan@6766 113 class-rgx=[A-Z_][a-zA-Z0-9]+$
ewan@6766 114
ewan@6766 115 # Regular expression which should only match correct function names
ewan@6766 116 function-rgx=[a-z_][A-Za-z0-9_]*$
ewan@6766 117
ewan@6766 118 # Regular expression which should only match correct method names
ewan@6766 119 method-rgx=[a-z_][A-Za-z0-9_]*$
ewan@6766 120
ewan@6766 121 # Regular expression which should only match correct argument names
ewan@6766 122 argument-rgx=[a-z_][A-Za-z0-9_]*$
ewan@6766 123
ewan@6766 124 # Regular expression which should only match correct variable names
ewan@6766 125 variable-rgx=[a-z_][A-Za-z0-9_]*$
ewan@6766 126
ewan@6766 127 # Good variable names which should always be accepted, separated by a comma
ewan@6766 128 good-names=i,j,k,ex,Run,_
ewan@6766 129
ewan@6766 130 # Bad variable names which should always be refused, separated by a comma
ewan@6766 131 bad-names=foo,bar,baz,toto,tutu,tata
ewan@6766 132
ewan@6766 133 # List of builtins function names that should not be used, separated by a comma
ewan@6766 134 bad-functions=map,filter,apply,input
ewan@6766 135
ewan@6766 136
ewan@6766 137
ewan@6766 138 # checks for sign of poor/misdesign:
ewan@6766 139 # * number of methods, attributes, local variables...
ewan@6766 140 # * size, complexity of functions, methods
ewan@6766 141 #
ewan@6766 142 [DESIGN]
ewan@6766 143 # Enable / disable this checker
ewan@6766 144 enable-design=yes
ewan@6766 145
ewan@6766 146 # Maximum number of arguments for function / method
ewan@6766 147 max-args=15
ewan@6766 148
ewan@6766 149 # Maximum number of locals for function / method body
ewan@6766 150 max-locals=15
ewan@6766 151
ewan@6766 152 # Maximum number of return / yield for function / method body
ewan@6766 153 max-returns=6
ewan@6766 154
ewan@6766 155 # Maximum number of branch for function / method body
ewan@6766 156 max-branchs=12
ewan@6766 157
ewan@6766 158 # Maximum number of statements in function / method body
ewan@6766 159 max-statements=50
ewan@6766 160
ewan@6766 161 # Maximum number of parents for a class (see R0901).
ewan@6766 162 max-parents=7
ewan@6766 163
ewan@6766 164 # Maximum number of attributes for a class (see R0902).
ewan@6766 165 max-attributes=7
ewan@6766 166
ewan@6766 167 # Minimum number of public methods for a class (see R0903).
ewan@6766 168 min-public-methods=2
ewan@6766 169
ewan@6766 170 # Maximum number of public methods for a class (see R0904).
ewan@6766 171 max-public-methods=20
ewan@6766 172
ewan@6766 173
ewan@6766 174
ewan@6766 175 # checks for :
ewan@6766 176 # * methods without self as first argument
ewan@6766 177 # * overriden methods signature
ewan@6766 178 # * access only to existant members via self
ewan@6766 179 # * attributes not defined in the __init__ method
ewan@6766 180 # * supported interfaces implementation
ewan@6766 181 # * unreachable code
ewan@6766 182 #
ewan@6766 183 [CLASSES]
ewan@6766 184 # Enable / disable this checker
ewan@6766 185 enable-classes=yes
ewan@6766 186
ewan@6766 187 # List of interface methods to ignore, separated by a comma. This is used for
ewan@6766 188 # instance to not check methods defines in Zope's Interface base class.
ewan@6766 189 ignore-iface-methods=isImplementedBy,deferred,extends,names,namesAndDescriptions,queryDescriptionFor,getBases,getDescriptionFor,getDoc,getName,getTaggedValue,getTaggedValueTags,isEqualOrExtendedBy,setTaggedValue,isImplementedByInstancesOf,adaptWith,is_implemented_by
ewan@6766 190
ewan@6766 191 # Tells wether missing members accessed in mixin class should be ignored. A
ewan@6766 192 # mixin class is detected if its name ends with "mixin" (case insensitive).
ewan@6766 193 ignore-mixin-members=yes
ewan@6766 194
ewan@6766 195
ewan@6766 196
ewan@6766 197 # checks for
ewan@6766 198 # * external modules dependencies
ewan@6766 199 # * relative / wildcard imports
ewan@6766 200 # * cyclic imports
ewan@6766 201 # * uses of deprecated modules
ewan@6766 202 #
ewan@6766 203 # This checker also defines the following reports:
ewan@6766 204 # * R0401: External dependencies
ewan@6766 205 # * R0402: Modules dependencies graph
ewan@6766 206 #
ewan@6766 207 [IMPORTS]
ewan@6766 208 # Enable / disable this checker
ewan@6766 209 enable-imports=no
ewan@6766 210
ewan@6766 211 # Deprecated modules which should not be used, separated by a comma
ewan@6766 212 deprecated-modules=regsub,string,TERMIOS,Bastion,rexec
ewan@6766 213
ewan@6766 214 # Create a graph of every (i.e. internal and external) dependencies in the given
ewan@6766 215 # file (report R0402 must not be disabled)
ewan@6766 216 import-graph=
ewan@6766 217
ewan@6766 218 # Create a graph of external dependencies in the given file (report R0402 must
ewan@6766 219 # not be disabled)
ewan@6766 220 ext-import-graph=
ewan@6766 221
ewan@6766 222 # Create a graph of internal dependencies in the given file (report R0402 must
ewan@6766 223 # not be disabled)
ewan@6766 224 int-import-graph=
ewan@6766 225
ewan@6766 226
ewan@6766 227
ewan@6766 228 # checks for
ewan@6766 229 # * excepts without exception filter
ewan@6766 230 # * string exceptions
ewan@6766 231 #
ewan@6766 232 [EXCEPTIONS]
ewan@6766 233 # Enable / disable this checker
ewan@6766 234 enable-exceptions=yes
ewan@6766 235
ewan@6766 236
ewan@6766 237
ewan@6766 238 # checks for :
ewan@6766 239 # * unauthorized constructions
ewan@6766 240 # * strict indentation
ewan@6766 241 # * line length
ewan@6766 242 # * use of <> instead of !=
ewan@6766 243 #
ewan@6766 244 [FORMAT]
ewan@6766 245 # Enable / disable this checker
ewan@6766 246 enable-format=no
ewan@6766 247
ewan@6766 248 # Maximum number of characters on a single line.
ewan@6766 249 max-line-length=80
ewan@6766 250
ewan@6766 251 # Maximum number of lines in a module
ewan@6766 252 max-module-lines=1000
ewan@6766 253
ewan@6766 254 # String used as indentation unit. This is usually " " (4 spaces) or "\t" (1 tab).
ewan@6766 255 indent-string=' '
ewan@6766 256
ewan@6766 257
ewan@6766 258
ewan@6766 259 # does not check anything but gives some raw metrics :
ewan@6766 260 # * total number of lines
ewan@6766 261 # * total number of code lines
ewan@6766 262 # * total number of docstring lines
ewan@6766 263 # * total number of comments lines
ewan@6766 264 # * total number of empty lines
ewan@6766 265 #
ewan@6766 266 # This checker also defines the following reports:
ewan@6766 267 # * R0701: Raw metrics
ewan@6766 268 #
ewan@6766 269 [METRICS]
ewan@6766 270 # Enable / disable this checker
ewan@6766 271 enable-metrics=yes
ewan@6766 272
ewan@6766 273
ewan@6766 274
ewan@6766 275 # checks for:
ewan@6766 276 # * warning notes in the code like FIXME, XXX
ewan@6766 277 # * PEP 263: source code with non ascii character but no encoding declaration
ewan@6766 278 #
ewan@6766 279 [MISCELLANEOUS]
ewan@6766 280 # Enable / disable this checker
ewan@6766 281 enable-miscellaneous=yes
ewan@6766 282
ewan@6766 283 # List of note tags to take in consideration, separated by a comma. Default to
ewan@6766 284 # FIXME, XXX, TODO
ewan@6766 285 notes=FIXME,XXX,TODO
ewan@6766 286
ewan@6766 287
ewan@6766 288
ewan@6766 289 # checks for similarities and duplicated code. This computation may be
ewan@6766 290 # memory / CPU intensive, so you should disable it if you experiments some
ewan@6766 291 # problems.
ewan@6766 292 #
ewan@6766 293 # This checker also defines the following reports:
ewan@6766 294 # * R0801: Duplication
ewan@6766 295 #
ewan@6766 296 [SIMILARITIES]
ewan@6766 297 # Enable / disable this checker
ewan@6766 298 enable-similarities=yes
ewan@6766 299
ewan@6766 300 # Minimum lines number of a similarity.
ewan@6766 301 min-similarity-lines=4
ewan@6766 302
ewan@6766 303 # Ignore comments when computing similarities.
ewan@6766 304 ignore-comments=yes
ewan@6766 305
ewan@6766 306
ewan@6766 307