xen-vtx-unstable

diff 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
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/tools/python/pylintrc	Tue Sep 13 15:05:49 2005 +0000
     1.3 @@ -0,0 +1,307 @@
     1.4 +# lint Python modules using external checkers.                            
     1.5 +#                                                                                
     1.6 +#     This is the main checker controling the other ones and the reports         
     1.7 +#     generation. It is itself both a raw checker and an astng checker in order  
     1.8 +#     to:                                                                        
     1.9 +#     * handle message activation / deactivation at the module level             
    1.10 +#     * handle some basic but necessary stats'data (number of classes, methods...)
    1.11 +#                                                                                 
    1.12 +# This checker also defines the following reports:                                    
    1.13 +#   * R0001: Total errors / warnings                                              
    1.14 +#   * R0002: % errors / warnings by module                                        
    1.15 +#   * R0003: Messages                                                             
    1.16 +#   * R0004: Global evaluation                                                    
    1.17 +# 
    1.18 +[MASTER]
    1.19 +# Add <file or directory> to the black list. It should be a base name, not a
    1.20 +# path. You may set this option multiple times.
    1.21 +ignore=CVS
    1.22 +
    1.23 +# Pickle collected data for later comparisons.
    1.24 +persistent=yes
    1.25 +
    1.26 +# Set the cache size for astng objects.
    1.27 +cache-size=500
    1.28 +
    1.29 +
    1.30 +
    1.31 +[REPORTS]
    1.32 +# Tells wether to display a full report or only the messages
    1.33 +reports=yes
    1.34 +
    1.35 +# Use HTML as output format instead of text
    1.36 +html=no
    1.37 +
    1.38 +# Use a parseable text output format, so your favorite text editor will be able
    1.39 +# to jump to the line corresponding to a message.
    1.40 +parseable=no
    1.41 +
    1.42 +# Colorizes text output using ansi escape codes
    1.43 +color=no
    1.44 +
    1.45 +# Put messages in a separate file for each module / package specified on the
    1.46 +# command line instead of printing them on stdout. Reports (if any) will be
    1.47 +# written in a file name "pylint_global.[txt|html]".
    1.48 +files-output=no
    1.49 +
    1.50 +# Python expression which should return a note less than 10 (10 is the highest
    1.51 +# note).You have access to the variables errors warning, statement which
    1.52 +# respectivly contain the number of errors / warnings messages and the total
    1.53 +# number of statements analyzed. This is used by the global evaluation report
    1.54 +# (R0004).
    1.55 +evaluation=10.0 - ((float(5 * error + warning + refactor + convention) / statement) * 10)
    1.56 +
    1.57 +# Add a comment according to your evaluation note. This is used by the global
    1.58 +# evaluation report (R0004).
    1.59 +comment=no
    1.60 +
    1.61 +# Include message's id in output
    1.62 +include-ids=yes
    1.63 +
    1.64 +
    1.65 +
    1.66 +# checks for                                                              
    1.67 +#     * unused variables / imports                                               
    1.68 +#     * undefined variables                                                      
    1.69 +#     * redefinition of variable from builtins or from an outer scope            
    1.70 +#     * use of variable before assigment                                         
    1.71 +#     
    1.72 +[VARIABLES]
    1.73 +# Enable / disable this checker
    1.74 +enable-variables=yes
    1.75 +
    1.76 +# Tells wether we should check for unused import in __init__ files.
    1.77 +init-import=no
    1.78 +
    1.79 +# List of variable names used for dummy variables (i.e. not used).
    1.80 +dummy-variables=_,dummy
    1.81 +
    1.82 +
    1.83 +
    1.84 +# checks for :                                                            
    1.85 +#     * doc strings                                                              
    1.86 +#     * modules / classes / functions / methods / arguments / variables name     
    1.87 +#     * number of arguments, local variables, branchs, returns and statements in
    1.88 +# functions, methods                                                       
    1.89 +#     * required module attributes                                             
    1.90 +#     * dangerous default values as arguments                                    
    1.91 +#     * redefinition of function / method / class                                
    1.92 +#     * uses of the global statement                                             
    1.93 +#                                                                                 
    1.94 +# This checker also defines the following reports:                                    
    1.95 +#   * R0101: Statistics by type                                                   
    1.96 +# 
    1.97 +[BASIC]
    1.98 +# Enable / disable this checker
    1.99 +enable-basic=yes
   1.100 +
   1.101 +# Required attributes for module, separated by a comma
   1.102 +required-attributes=
   1.103 +
   1.104 +# Regular expression which should only match functions or classes name which do
   1.105 +# not require a docstring
   1.106 +no-docstring-rgx=.*
   1.107 +
   1.108 +# Minimal length for module / class / function / method / argument / variable
   1.109 +# names
   1.110 +min-name-length=1
   1.111 +
   1.112 +# Regular expression which should only match correct module names
   1.113 +module-rgx=(([a-z_][a-z0-9_]*)|([A-Z][a-zA-Z0-9]+))$
   1.114 +
   1.115 +# Regular expression which should only match correct class names
   1.116 +class-rgx=[A-Z_][a-zA-Z0-9]+$
   1.117 +
   1.118 +# Regular expression which should only match correct function names
   1.119 +function-rgx=[a-z_][A-Za-z0-9_]*$
   1.120 +
   1.121 +# Regular expression which should only match correct method names
   1.122 +method-rgx=[a-z_][A-Za-z0-9_]*$
   1.123 +
   1.124 +# Regular expression which should only match correct argument names
   1.125 +argument-rgx=[a-z_][A-Za-z0-9_]*$
   1.126 +
   1.127 +# Regular expression which should only match correct variable names
   1.128 +variable-rgx=[a-z_][A-Za-z0-9_]*$
   1.129 +
   1.130 +# Good variable names which should always be accepted, separated by a comma
   1.131 +good-names=i,j,k,ex,Run,_
   1.132 +
   1.133 +# Bad variable names which should always be refused, separated by a comma
   1.134 +bad-names=foo,bar,baz,toto,tutu,tata
   1.135 +
   1.136 +# List of builtins function names that should not be used, separated by a comma
   1.137 +bad-functions=map,filter,apply,input
   1.138 +
   1.139 +
   1.140 +
   1.141 +# checks for sign of poor/misdesign:                                      
   1.142 +#     * number of methods, attributes, local variables...                        
   1.143 +#     * size, complexity of functions, methods                                   
   1.144 +#     
   1.145 +[DESIGN]
   1.146 +# Enable / disable this checker
   1.147 +enable-design=yes
   1.148 +
   1.149 +# Maximum number of arguments for function / method
   1.150 +max-args=15
   1.151 +
   1.152 +# Maximum number of locals for function / method body
   1.153 +max-locals=15
   1.154 +
   1.155 +# Maximum number of return / yield for function / method body
   1.156 +max-returns=6
   1.157 +
   1.158 +# Maximum number of branch for function / method body
   1.159 +max-branchs=12
   1.160 +
   1.161 +# Maximum number of statements in function / method body
   1.162 +max-statements=50
   1.163 +
   1.164 +# Maximum number of parents for a class (see R0901).
   1.165 +max-parents=7
   1.166 +
   1.167 +# Maximum number of attributes for a class (see R0902).
   1.168 +max-attributes=7
   1.169 +
   1.170 +# Minimum number of public methods for a class (see R0903).
   1.171 +min-public-methods=2
   1.172 +
   1.173 +# Maximum number of public methods for a class (see R0904).
   1.174 +max-public-methods=20
   1.175 +
   1.176 +
   1.177 +
   1.178 +# checks for :                                                            
   1.179 +#     * methods without self as first argument                                   
   1.180 +#     * overriden methods signature                                              
   1.181 +#     * access only to existant members via self                                 
   1.182 +#     * attributes not defined in the __init__ method                            
   1.183 +#     * supported interfaces implementation                                      
   1.184 +#     * unreachable code                                                         
   1.185 +#     
   1.186 +[CLASSES]
   1.187 +# Enable / disable this checker
   1.188 +enable-classes=yes
   1.189 +
   1.190 +# List of interface methods to ignore, separated by a comma. This is used for
   1.191 +# instance to not check methods defines in Zope's Interface base class.
   1.192 +ignore-iface-methods=isImplementedBy,deferred,extends,names,namesAndDescriptions,queryDescriptionFor,getBases,getDescriptionFor,getDoc,getName,getTaggedValue,getTaggedValueTags,isEqualOrExtendedBy,setTaggedValue,isImplementedByInstancesOf,adaptWith,is_implemented_by
   1.193 +
   1.194 +# Tells wether missing members accessed in mixin class should be ignored. A
   1.195 +# mixin class is detected if its name ends with "mixin" (case insensitive).
   1.196 +ignore-mixin-members=yes
   1.197 +
   1.198 +
   1.199 +
   1.200 +# checks for                                                              
   1.201 +#     * external modules dependencies                                            
   1.202 +#     * relative / wildcard imports                                                         
   1.203 +#     * cyclic imports                                                           
   1.204 +#     * uses of deprecated modules
   1.205 +#                                                                                 
   1.206 +# This checker also defines the following reports:                                    
   1.207 +#   * R0401: External dependencies                                                
   1.208 +#   * R0402: Modules dependencies graph                                           
   1.209 +# 
   1.210 +[IMPORTS]
   1.211 +# Enable / disable this checker
   1.212 +enable-imports=no
   1.213 +
   1.214 +# Deprecated modules which should not be used, separated by a comma
   1.215 +deprecated-modules=regsub,string,TERMIOS,Bastion,rexec
   1.216 +
   1.217 +# Create a graph of every (i.e. internal and external) dependencies in the given
   1.218 +# file (report R0402 must not be disabled)
   1.219 +import-graph=
   1.220 +
   1.221 +# Create a graph of external dependencies in the given file (report R0402 must
   1.222 +# not be disabled)
   1.223 +ext-import-graph=
   1.224 +
   1.225 +# Create a graph of internal dependencies in the given file (report R0402 must
   1.226 +# not be disabled)
   1.227 +int-import-graph=
   1.228 +
   1.229 +
   1.230 +
   1.231 +# checks for                                                              
   1.232 +#     * excepts without exception filter                                         
   1.233 +#     * string exceptions                                                        
   1.234 +#     
   1.235 +[EXCEPTIONS]
   1.236 +# Enable / disable this checker
   1.237 +enable-exceptions=yes
   1.238 +
   1.239 +
   1.240 +
   1.241 +# checks for :                                                            
   1.242 +#     * unauthorized constructions                                               
   1.243 +#     * strict indentation                                                       
   1.244 +#     * line length                                                              
   1.245 +#     * use of <> instead of !=
   1.246 +#     
   1.247 +[FORMAT]
   1.248 +# Enable / disable this checker
   1.249 +enable-format=no
   1.250 +
   1.251 +# Maximum number of characters on a single line.
   1.252 +max-line-length=80
   1.253 +
   1.254 +# Maximum number of lines in a module
   1.255 +max-module-lines=1000
   1.256 +
   1.257 +# String used as indentation unit. This is usually " " (4 spaces) or "\t" (1 tab).
   1.258 +indent-string='    '
   1.259 +
   1.260 +
   1.261 +
   1.262 +# does not check anything but gives some raw metrics :                    
   1.263 +#     * total number of lines                                                    
   1.264 +#     * total number of code lines                                               
   1.265 +#     * total number of docstring lines                                          
   1.266 +#     * total number of comments lines                                           
   1.267 +#     * total number of empty lines                                              
   1.268 +#                                                                                 
   1.269 +# This checker also defines the following reports:                                    
   1.270 +#   * R0701: Raw metrics                                                          
   1.271 +# 
   1.272 +[METRICS]
   1.273 +# Enable / disable this checker
   1.274 +enable-metrics=yes
   1.275 +
   1.276 +
   1.277 +
   1.278 +# checks for:                                                             
   1.279 +#     * warning notes in the code like FIXME, XXX                                
   1.280 +#     * PEP 263: source code with non ascii character but no encoding declaration
   1.281 +#     
   1.282 +[MISCELLANEOUS]
   1.283 +# Enable / disable this checker
   1.284 +enable-miscellaneous=yes
   1.285 +
   1.286 +# List of note tags to take in consideration, separated by a comma. Default to
   1.287 +# FIXME, XXX, TODO
   1.288 +notes=FIXME,XXX,TODO
   1.289 +
   1.290 +
   1.291 +
   1.292 +# checks for similarities and duplicated code. This computation may be
   1.293 +#     memory / CPU intensive, so you should disable it if you experiments some
   1.294 +#     problems.
   1.295 +#                                                                                 
   1.296 +# This checker also defines the following reports:                                    
   1.297 +#   * R0801: Duplication                                                          
   1.298 +# 
   1.299 +[SIMILARITIES]
   1.300 +# Enable / disable this checker
   1.301 +enable-similarities=yes
   1.302 +
   1.303 +# Minimum lines number of a similarity.
   1.304 +min-similarity-lines=4
   1.305 +
   1.306 +# Ignore comments when computing similarities.
   1.307 +ignore-comments=yes
   1.308 +
   1.309 +
   1.310 +