This commit is contained in:
Jeremy Fincher 2003-10-05 13:03:24 +00:00
parent ef517515f7
commit 2a727d2f28
1 changed files with 52 additions and 53 deletions

View File

@ -1,7 +1,6 @@
# lint Python modules using external checkers.
#
[MASTER] [MASTER]
# add <file> (may be a directory) to the black list. It should be a base name, not a path. You may set this option multiple times. # add <file> (may be a directory) to the black list.
# It should be a base name, not a path. You may set this option multiple times.
ignore=CVS ignore=CVS
# make statistics on collected data. # make statistics on collected data.
@ -10,20 +9,17 @@ statistics=yes
# pickle collected data for later comparisons. # pickle collected data for later comparisons.
persistent=yes persistent=yes
# Python expression which should return a note lesser than 10 (10 is the highest note).You have access to the variables errors, warnings, statements which respectivly contains the number of errors / warnings messages and the total number of statements analyzed.
evaluation='10.0 - ((float(2 * errors + warnings) / statements) * 10)'
# Add a comment according to your evaluation note. # Add a comment according to your evaluation note.
comment=no comment=no
# checks for # checks for
# * external modules dependancies # * external modules dependancies
# * relative / wildcard imports # * relative / wildcard imports
# * cyclic imports # * cyclic imports
# * uses of depreceted modules # * uses of depreceted modules
#
[IMPORTS] [IMPORTS]
# enable/disable this checker # enable/disable this checker
enable-imports=yes enable-imports=yes
@ -46,14 +42,14 @@ deprecated-modules=regsub,TERMIOS
# checks for : # checks for :
# * doc strings # * doc strings
# * modules / classes / functions / methods / arguments / variables name # * modules / classes / functions / methods / arguments / variables name
# * number of arguments, local variables, branchs, returns and statements in # * number of arguments, local variables, branchs, returns and statements
# functions, methods # in functions, methods
# * required module's attributes # * required module's attributes
# * dangerous default values as arguments # * dangerous default values as arguments
# * redefinition of function / method / class # * redefinition of function / method / class
# * uses of the global statement # * uses of the global statement
# #
[BASIC] [BASIC]
# enable/disable this checker # enable/disable this checker
@ -86,41 +82,44 @@ unreachable=yes
# Check for function / method / class redefinition # Check for function / method / class redefinition
redefinition=yes redefinition=yes
# Regular expression which should only match functions which do not require a docstring # Regular expression which should only match functions which
# do not require a docstring
no-docstring-rgx=_.* no-docstring-rgx=_.*
# Minimal length for module / class / function / method / argument / variable names # Minimal length for module/class/function/method/argument/variable names
min-name-length=0 min-name-length=3
# Regular expression which should only match correct module name # Regular expression which should only match correct module name
module-rgx=[a-z_]+ module-rgx=([a-z_]+|[A-Z][a-zA-Z0-9]+)
# Regular expression which should only match correct class name # Regular expression which should only match correct class name
class-rgx=[A-Z][a-zA-Z]+ class-rgx=([A-Z][a-zA-Z]+|[a-z]+)
# Regular expression which should only match correct function name # Regular expression which should only match correct function name
function-rgx=[a-zA-Z_]+ function-rgx=[a-zA-Z_]+
# Regular expression which should only match correct argument name # Regular expression which should only match correct argument name
argument-rgx=[a-z_]+ argument-rgx=[a-z_][A-Za-z0-9]*
# Regular expression which should only match correct variable name # Regular expression which should only match correct variable name
variable-rgx=[a-z_]+ variable-rgx=[a-z_][A-Za-z0-9]*
# Good variable names which are lesser than min-name-length or wouldn't match the variable-rgx, separated by a comma # Good variable names which are lesser than min-name-length
good-variable-names=i,j,k,ex # or wouldn't match the variable-rgx, separated by a comma
good-variable-names=i,j,k,db,s,t,s1,s2,t1,t2,m,e,cb,r,h,c,fd,_,u,tb,f,no,b,bg,fg,id
# Bad variable names which are greater than min-name-length or would match the variable-rgx, separated by a comma # Bad variable names which are greater than min-name-length or would
# match the variable-rgx, separated by a comma
bad-variable-names=foo,bar,baz,toto,tutu,tata bad-variable-names=foo,bar,baz,toto,tutu,tata
# checks for # checks for
# * unused variables / imports # * unused variables / imports
# * undefined variables # * undefined variables
# * redefinition of variable from builtins or from an outer scope # * redefinition of variable from builtins or from an outer scope
# * use of variable before assigment # * use of variable before assigment
#
[VARIABLES] [VARIABLES]
# enable/disable this checker # enable/disable this checker
enable-variables=yes enable-variables=yes
@ -128,13 +127,13 @@ enable-variables=yes
# checks for : # checks for :
# * methods without self as first argument # * methods without self as first argument
# * overriden methods signature # * overriden methods signature
# * access only to existant members via self # * access only to existant members via self
# * attributes not defined in the __init__ method # * attributes not defined in the __init__ method
# * supported interfaces implementation # * supported interfaces implementation
# * unreachable code # * unreachable code
#
[CLASSES] [CLASSES]
# enable/disable this checker # enable/disable this checker
enable-classes=yes enable-classes=yes
@ -154,12 +153,12 @@ interfaces=yes
# gives some raw metrics : # gives some raw metrics :
# * total number of lines # * total number of lines
# * total number of code lines # * total number of code lines
# * total number of docstring lines # * total number of docstring lines
# * total number of comments lines # * total number of comments lines
# * total number of empty lines # * total number of empty lines
#
[METRICS] [METRICS]
# enable/disable this checker # enable/disable this checker
enable-metrics=yes enable-metrics=yes
@ -167,9 +166,9 @@ enable-metrics=yes
# checks for: # checks for:
# * source code with non ascii characters but np encoding declaration (PEP 263) # * source code with non ascii characters but no encoding declaration
# * warning notes in the code like FIXME, XXX # * warning notes in the code like FIXME, XXX
#
[MISCELLANEOUS] [MISCELLANEOUS]
# enable/disable this checker # enable/disable this checker
enable-miscellaneous=yes enable-miscellaneous=yes
@ -177,22 +176,22 @@ enable-miscellaneous=yes
# check or not for source code encoding # check or not for source code encoding
encoding=yes encoding=yes
# list of notes to take in consideration, separated by a comma. Default to FIXME,XXX # list of notes to take in consideration, separated by a comma.
notes=FIXME,XXX,TODO notes=FIXME,XXX,TODO
# checks for : # checks for :
# * unauthorized constructions # * unauthorized constructions
# * strict indentation # * strict indentation
# * lines'length # * lines'length
#
[FORMAT] [FORMAT]
# enable/disable this checker # enable/disable this checker
enable-format=yes enable-format=yes
# Maximum number of characters on a single line. # Maximum number of characters on a single line.
max-line-length=78 max-line-length=79
# Maximum number of lines in a module # Maximum number of lines in a module
max-module-lines=1000 max-module-lines=1000