2003-10-04 16:55:17 +02:00
|
|
|
[MASTER]
|
2003-10-05 15:03:24 +02:00
|
|
|
# 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.
|
2003-10-04 16:55:17 +02:00
|
|
|
ignore=CVS
|
|
|
|
|
|
|
|
# make statistics on collected data.
|
|
|
|
statistics=yes
|
|
|
|
|
|
|
|
# pickle collected data for later comparisons.
|
|
|
|
persistent=yes
|
|
|
|
|
|
|
|
# Add a comment according to your evaluation note.
|
|
|
|
comment=no
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# checks for
|
2003-10-05 15:03:24 +02:00
|
|
|
# * external modules dependancies
|
|
|
|
# * relative / wildcard imports
|
|
|
|
# * cyclic imports
|
2003-10-04 16:55:17 +02:00
|
|
|
# * uses of depreceted modules
|
2003-10-05 15:03:24 +02:00
|
|
|
|
2003-10-04 16:55:17 +02:00
|
|
|
[IMPORTS]
|
|
|
|
# enable/disable this checker
|
|
|
|
enable-imports=yes
|
|
|
|
|
|
|
|
# check external dependencies
|
|
|
|
dependencies=yes
|
|
|
|
|
|
|
|
# check relative imports
|
|
|
|
relative=no
|
|
|
|
|
|
|
|
# check wildcard imports
|
|
|
|
wildcard=no
|
|
|
|
|
|
|
|
# check cyclic imports
|
|
|
|
cycles=yes
|
|
|
|
|
|
|
|
# Deprecated modules which should not be used, separated by a comma
|
|
|
|
deprecated-modules=regsub,TERMIOS
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# checks for :
|
2003-10-05 15:03:24 +02:00
|
|
|
# * doc strings
|
|
|
|
# * modules / classes / functions / methods / arguments / variables name
|
|
|
|
# * number of arguments, local variables, branchs, returns and statements
|
|
|
|
# in functions, methods
|
|
|
|
# * required module's attributes
|
|
|
|
# * dangerous default values as arguments
|
2003-10-04 16:55:17 +02:00
|
|
|
# * redefinition of function / method / class
|
2003-10-05 15:03:24 +02:00
|
|
|
# * uses of the global statement
|
2003-10-04 16:55:17 +02:00
|
|
|
#
|
|
|
|
[BASIC]
|
|
|
|
# enable/disable this checker
|
|
|
|
enable-basic=yes
|
|
|
|
|
|
|
|
# Maximum number of arguments for function / method
|
|
|
|
max-args=5
|
|
|
|
|
|
|
|
# Maximum number of locals for function / method body
|
|
|
|
max-locals=15
|
|
|
|
|
|
|
|
# Maximum number of return / yield for function / method body
|
|
|
|
max-returns=12
|
|
|
|
|
|
|
|
# Maximum number of branch for function / method body
|
|
|
|
max-branchs=12
|
|
|
|
|
|
|
|
# Maximum number of statements in function / method body
|
|
|
|
max-statements=50
|
|
|
|
|
|
|
|
# Warning on global statements
|
|
|
|
global-warning=no
|
|
|
|
|
|
|
|
# Check for unreachable code
|
|
|
|
unreachable=yes
|
|
|
|
|
|
|
|
# Check for function / method / class redefinition
|
|
|
|
redefinition=yes
|
|
|
|
|
2003-10-05 15:03:24 +02:00
|
|
|
# Regular expression which should only match functions which
|
|
|
|
# do not require a docstring
|
2003-10-04 16:55:17 +02:00
|
|
|
no-docstring-rgx=_.*
|
|
|
|
|
2003-10-05 15:03:24 +02:00
|
|
|
# Minimal length for module/class/function/method/argument/variable names
|
|
|
|
min-name-length=3
|
2003-10-04 16:55:17 +02:00
|
|
|
|
|
|
|
# Regular expression which should only match correct module name
|
2003-10-05 15:03:24 +02:00
|
|
|
module-rgx=([a-z_]+|[A-Z][a-zA-Z0-9]+)
|
2003-10-04 16:55:17 +02:00
|
|
|
|
|
|
|
# Regular expression which should only match correct class name
|
2003-10-05 15:03:24 +02:00
|
|
|
class-rgx=([A-Z][a-zA-Z]+|[a-z]+)
|
2003-10-04 16:55:17 +02:00
|
|
|
|
|
|
|
# Regular expression which should only match correct function name
|
|
|
|
function-rgx=[a-zA-Z_]+
|
|
|
|
|
|
|
|
# Regular expression which should only match correct argument name
|
2003-10-05 15:03:24 +02:00
|
|
|
argument-rgx=[a-z_][A-Za-z0-9]*
|
2003-10-04 16:55:17 +02:00
|
|
|
|
|
|
|
# Regular expression which should only match correct variable name
|
2003-10-05 15:03:24 +02:00
|
|
|
variable-rgx=[a-z_][A-Za-z0-9]*
|
2003-10-04 16:55:17 +02:00
|
|
|
|
2003-10-05 15:03:24 +02:00
|
|
|
# Good variable names which are lesser than min-name-length
|
|
|
|
# or wouldn't match the variable-rgx, separated by a comma
|
2003-10-05 15:21:29 +02:00
|
|
|
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,L,p,ff,x,n,d,cs,ct,g,ip
|
2003-10-04 16:55:17 +02:00
|
|
|
|
2003-10-05 15:03:24 +02:00
|
|
|
# Bad variable names which are greater than min-name-length or would
|
|
|
|
# match the variable-rgx, separated by a comma
|
2003-10-04 16:55:17 +02:00
|
|
|
bad-variable-names=foo,bar,baz,toto,tutu,tata
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# checks for
|
2003-10-05 15:03:24 +02:00
|
|
|
# * unused variables / imports
|
|
|
|
# * undefined variables
|
|
|
|
# * redefinition of variable from builtins or from an outer scope
|
|
|
|
# * use of variable before assigment
|
|
|
|
|
2003-10-04 16:55:17 +02:00
|
|
|
[VARIABLES]
|
|
|
|
# enable/disable this checker
|
|
|
|
enable-variables=yes
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# checks for :
|
2003-10-05 15:03:24 +02:00
|
|
|
# * methods without self as first argument
|
|
|
|
# * overriden methods signature
|
|
|
|
# * access only to existant members via self
|
|
|
|
# * attributes not defined in the __init__ method
|
|
|
|
# * supported interfaces implementation
|
|
|
|
# * unreachable code
|
|
|
|
|
2003-10-04 16:55:17 +02:00
|
|
|
[CLASSES]
|
|
|
|
# enable/disable this checker
|
|
|
|
enable-classes=yes
|
|
|
|
|
|
|
|
# print a warning method without self as first argument
|
|
|
|
self-warning=yes
|
|
|
|
|
|
|
|
# check that attributes are defined in the __init__ method
|
|
|
|
init=yes
|
|
|
|
|
|
|
|
# check that accessed members are defined
|
|
|
|
members=yes
|
|
|
|
|
|
|
|
# check declared interfaces are truly implemented
|
|
|
|
interfaces=yes
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# gives some raw metrics :
|
2003-10-05 15:03:24 +02:00
|
|
|
# * total number of lines
|
|
|
|
# * total number of code lines
|
|
|
|
# * total number of docstring lines
|
|
|
|
# * total number of comments lines
|
|
|
|
# * total number of empty lines
|
|
|
|
|
2003-10-04 16:55:17 +02:00
|
|
|
[METRICS]
|
|
|
|
# enable/disable this checker
|
|
|
|
enable-metrics=yes
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# checks for:
|
2003-10-05 15:03:24 +02:00
|
|
|
# * source code with non ascii characters but no encoding declaration
|
2003-10-04 16:55:17 +02:00
|
|
|
# * warning notes in the code like FIXME, XXX
|
2003-10-05 15:03:24 +02:00
|
|
|
|
2003-10-04 16:55:17 +02:00
|
|
|
[MISCELLANEOUS]
|
|
|
|
# enable/disable this checker
|
|
|
|
enable-miscellaneous=yes
|
|
|
|
|
|
|
|
# check or not for source code encoding
|
|
|
|
encoding=yes
|
|
|
|
|
2003-10-05 15:03:24 +02:00
|
|
|
# list of notes to take in consideration, separated by a comma.
|
2003-10-04 16:55:17 +02:00
|
|
|
notes=FIXME,XXX,TODO
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# checks for :
|
2003-10-05 15:03:24 +02:00
|
|
|
# * unauthorized constructions
|
|
|
|
# * strict indentation
|
|
|
|
# * lines'length
|
|
|
|
|
2003-10-04 16:55:17 +02:00
|
|
|
[FORMAT]
|
|
|
|
# enable/disable this checker
|
|
|
|
enable-format=yes
|
|
|
|
|
|
|
|
# Maximum number of characters on a single line.
|
2003-10-05 15:03:24 +02:00
|
|
|
max-line-length=79
|
2003-10-04 16:55:17 +02:00
|
|
|
|
|
|
|
# Maximum number of lines in a module
|
|
|
|
max-module-lines=1000
|
|
|
|
|
|
|
|
# Indicate whether to check or not for bad construction
|
|
|
|
bad-construction=yes
|
|
|
|
|
|
|
|
|
|
|
|
|