Update pylintrc file. Now function and method names can by up to 40 characters (30...
[Melange.git] / scripts / pylint / pylintrc
blobbd1370fccf5fd11c61bb9b8e0fae1dafa804d078
1 # This is a configuration file for pylint to be used for checking the
2 # quality of the Melange code
3
4 # just run:
5 #   scripts/pylint/do_pylint.sh
7 [MASTER]
9 # Profiled execution.
10 profile=no
12 # Add <file or directory> to the black list. It should be a base name, not a
13 # path. You may set this option multiple times.
14 ignore=.svn
16 # Pickle collected data for later comparisons.
17 persistent=yes
19 # Set the cache size for astng objects.
20 cache-size=500
22 # List of plugins (as comma separated values of python modules names) to load,
23 # usually to register additional checkers.
24 load-plugins=
27 [MESSAGES CONTROL]
29 # Enable only checker(s) with the given id(s). This option conflicts with the
30 # disable-checker option
31 #enable-checker=
33 # Enable all checker(s) except those with the given id(s). This option
34 # conflicts with the enable-checker option
35 disable-checker=design
37 # Enable all messages in the listed categories.
38 #enable-msg-cat=
40 # Disable all messages in the listed categories.
41 #disable-msg-cat=
43 # Enable the message(s) with the given id(s).
44 #enable-msg=
47 # Disable the message(s) with the given id(s).
48 # List of all available ids: http://www.logilab.org/card/pylintfeatures
49 # Potential messages that might be added later include:
50 # C0302,R0201
52 # Disabled messages:
53 # W0613: Unused argument %r Used when a function or method argument is not used.
54 # W0622: Redefining built-in %r Used when a variable or function override a built-in.
55 # W0232: Class has no __init__ method Used when a class has no __init__ method, neither 
56 #        its parent classes.
57 # W0142: Used * or * magic* Used when a function or method is called using *args or **kwargs
58 #        to dispatch arguments. This doesn't improve readility and should be used with care.
59 # W0102: Dangerous default value %s as argument Used when a mutable value as list or dictionary 
60 #        is detected in a default value for an argument.
61 # W0212: Access to a protected member %s of a client class Used when a protected member 
62 #        (i.e. class member with a name beginning with an underscore) is access outside the class 
63 #        or a descendant of the class where it's defined.
64 # R0201: Method could be a function. Used when a method doesn't use its bound instance, and so 
65 #        could be written as a function.
66 # R0801: Similar lines in %s files. Indicates that a set of similar lines has been detected 
67 #        among multiple file. This usually means that the code should be refactored to avoid this
68 #        duplication.
69 disable-msg=W0613,W0622,W0232,W0142,W0102,W0212,R0201,R0801
72 [REPORTS]
74 # set the output format. Available formats are text, parseable, colorized, msvs
75 # (visual studio) and html
76 output-format=text
78 # Include message's id in output
79 include-ids=yes
81 # Put messages in a separate file for each module / package specified on the
82 # command line instead of printing them on stdout. Reports (if any) will be
83 # written in a file name "pylint_global.[txt|html]".
84 files-output=no
86 # Tells wether to display a full report or only the messages
87 reports=yes
89 # Python expression which should return a note less than 10 (10 is the highest
90 # note).You have access to the variables errors warning, statement which
91 # respectivly contain the number of errors / warnings messages and the total
92 # number of statements analyzed. This is used by the global evaluation report
93 # (R0004).
94 evaluation=10.0 - ((float(5 * error + warning + refactor + convention) / statement) * 10)
96 # Add a comment according to your evaluation note. This is used by the global
97 # evaluation report (R0004).
98 comment=no
100 # Enable the report(s) with the given id(s).
101 #enable-report=
103 # Disable the report(s) with the given id(s).
104 #disable-report=
107 # checks for :
108 # * doc strings
109 # * modules / classes / functions / methods / arguments / variables name
110 # * number of arguments, local variables, branchs, returns and statements in
111 # functions, methods
112 # * required module attributes
113 # * dangerous default values as arguments
114 # * redefinition of function / method / class
115 # * uses of the global statement
117 [BASIC]
119 # Required attributes for module, separated by a comma
120 required-attributes=
122 # Regular expression which should only match functions or classes name which do
123 # not require a docstring
124 no-docstring-rgx=__.*__
126 # Regular expression which should only match correct module names
127 module-rgx=(([a-z_][a-z0-9_]*)|([A-Z][a-zA-Z0-9]+))$
129 # Regular expression which should only match correct module level names
130 const-rgx=(([A-Z_][A-Z1-9_]*)|(__.*__)|([a-z_][a-z0-9_]*))$
132 # Regular expression which should only match correct class names
133 class-rgx=[A-Z_][a-zA-Z0-9]+$
135 # Regular expression which should only match correct function names
136 function-rgx=[a-z_][a-zA-Z0-9_]{2,40}$
138 # Regular expression which should only match correct method names
139 method-rgx=[a-z_][a-zA-Z0-9_]{2,40}$
141 # Regular expression which should only match correct instance attribute names
142 attr-rgx=[a-z_][a-z0-9_]{2,30}$
143 #alternative
144 #attr-rgx=([a-z_][a-z0-9_]{2,30}|([a-z_][a-zA-Z0-9]{2,30}))$
146 # Regular expression which should only match correct argument names
147 argument-rgx=[a-z_][a-z0-9_]{1,30}$
149 # Regular expression which should only match correct variable names
150 variable-rgx=[a-z_][a-zA-Z0-9_]{1,30}$
152 # Regular expression which should only match correct list comprehension /
153 # generator expression variable names
154 inlinevar-rgx=[A-Za-z_][A-Za-z0-9_]*$
156 # Good variable names which should always be accepted, separated by a comma
157 good-names=i,j,k,ex,Run,_
159 # Bad variable names which should always be refused, separated by a comma
160 bad-names=foo,bar,baz,toto,tutu,tata
162 # List of builtins function names that should not be used, separated by a comma
163 bad-functions=map,filter,apply,input
166 # try to find bugs in the code using type inference
168 [TYPECHECK]
170 # Tells wether missing members accessed in mixin class should be ignored. A
171 # mixin class is detected if its name ends with "mixin" (case insensitive).
172 ignore-mixin-members=yes
174 # List of classes names for which member attributes should not be checked
175 # (useful for classes with attributes dynamicaly set).
176 ignored-classes=SQLObject
178 # When zope mode is activated, consider the acquired-members option to ignore
179 # access to some undefined attributes.
180 zope=no
182 # List of members which are usually get through zope's acquisition mecanism and
183 # so shouldn't trigger E0201 when accessed (need zope=yes to be considered).
184 acquired-members=REQUEST,acl_users,aq_parent
187 # checks for
188 # * unused variables / imports
189 # * undefined variables
190 # * redefinition of variable from builtins or from an outer scope
191 # * use of variable before assigment
193 [VARIABLES]
195 # Tells wether we should check for unused import in __init__ files.
196 init-import=no
198 # A regular expression matching names used for dummy variables (i.e. not used).
199 dummy-variables-rgx=_|dummy
201 # List of additional names supposed to be defined in builtins. Remember that
202 # you should avoid to define new builtins when possible.
203 additional-builtins=
206 # checks for :
207 # * methods without self as first argument
208 # * overridden methods signature
209 # * access only to existant members via self
210 # * attributes not defined in the __init__ method
211 # * supported interfaces implementation
212 # * unreachable code
214 [CLASSES]
216 # List of interface methods to ignore, separated by a comma. This is used for
217 # instance to not check methods defines in Zope's Interface base class.
218 ignore-iface-methods=isImplementedBy,deferred,extends,names,namesAndDescriptions,queryDescriptionFor,getBases,getDescriptionFor,getDoc,getName,getTaggedValue,getTaggedValueTags,isEqualOrExtendedBy,setTaggedValue,isImplementedByInstancesOf,adaptWith,is_implemented_by
220 # List of method names used to declare (i.e. assign) instance attributes.
221 defining-attr-methods=__init__,__new__,setUp
224 # checks for
225 # * external modules dependencies
226 # * relative / wildcard imports
227 # * cyclic imports
228 # * uses of deprecated modules
230 [IMPORTS]
232 # Deprecated modules which should not be used, separated by a comma
233 deprecated-modules=regsub,string,TERMIOS,Bastion,rexec
235 # Create a graph of every (i.e. internal and external) dependencies in the
236 # given file (report R0402 must not be disabled)
237 import-graph=
239 # Create a graph of external dependencies in the given file (report R0402 must
240 # not be disabled)
241 ext-import-graph=
243 # Create a graph of internal dependencies in the given file (report R0402 must
244 # not be disabled)
245 int-import-graph=
248 # checks for :
249 # * unauthorized constructions
250 # * strict indentation
251 # * line length
252 # * use of <> instead of !=
254 [FORMAT]
256 # Maximum number of characters on a single line.
257 max-line-length=80
259 # Maximum number of lines in a module
260 max-module-lines=1000
262 # String used as indentation unit. This is usually " " (4 spaces) or "\t" (1
263 # tab).
264 indent-string='  '
267 # checks for:
268 # * warning notes in the code like TODO
269 # * PEP 263: source code with non ascii character but no encoding declaration
271 [MISCELLANEOUS]
273 # List of note tags to take in consideration, separated by a comma.
274 notes=TODO
277 # checks for similarities and duplicated code. This computation may be
278 # memory / CPU intensive, so you should disable it if you experiments some
279 # problems.
281 [SIMILARITIES]
283 # Minimum lines number of a similarity.
284 min-similarity-lines=4
286 # Ignore comments when computing similarities.
287 ignore-comments=yes
289 # Ignore docstrings when computing similarities.
290 ignore-docstrings=yes