1 # lint Python modules using external checkers.
3 # This is the main checker controling the other ones and the reports
4 # generation. It is itself both a raw checker and an astng checker in order
6 # * handle message activation / deactivation at the module level
7 # * handle some basic but necessary stats'data (number of classes, methods...)
11 # Specify a configuration file.
14 # Python code to execute, usually for sys.path manipulation such as
21 # Add <file or directory> to the black list. It should be a base name, not a
22 # path. You may set this option multiple times.
25 # Pickle collected data for later comparisons.
28 # Set the cache size for astng objects.
31 # List of plugins (as comma separated values of python modules names) to load,
32 # usually to register additional checkers.
38 # Enable only checker(s) with the given id(s). This option conflict with the
39 # disable-checker option
42 # Enable all checker(s) except those with the given id(s). This option conflict
43 # with the disable-checker option
46 # Enable all messages in the listed categories.
49 # Disable all messages in the listed categories.
52 # Enable the message(s) with the given id(s).
55 # Disable the message(s) with the given id(s).
61 # set the output format. Available formats are text, parseable, colorized, msvs
62 # (visual studio) and html
65 # Include message's id in output
68 # Put messages in a separate file for each module / package specified on the
69 # command line instead of printing them on stdout. Reports (if any) will be
70 # written in a file name "pylint_global.[txt|html]".
73 # Tells wether to display a full report or only the messages
76 # Python expression which should return a note less than 10 (10 is the highest
77 # note).You have access to the variables errors warning, statement which
78 # respectivly contain the number of errors / warnings messages and the total
79 # number of statements analyzed. This is used by the global evaluation report
81 evaluation=10.0 - ((float(5 * error + warning + refactor + convention) / statement) * 10)
83 # Add a comment according to your evaluation note. This is used by the global
84 # evaluation report (R0004).
87 # Enable the report(s) with the given id(s).
90 # Disable the report(s) with the given id(s).
96 # * modules / classes / functions / methods / arguments / variables name
97 # * number of arguments, local variables, branchs, returns and statements in
99 # * required module attributes
100 # * dangerous default values as arguments
101 # * redefinition of function / method / class
102 # * uses of the global statement
106 # Required attributes for module, separated by a comma
109 # Regular expression which should only match functions or classes name which do
110 # not require a docstring
111 no-docstring-rgx=__.*__
113 # Regular expression which should only match correct module names
114 module-rgx=(([a-z_][a-z0-9_]*)|([A-Z][a-zA-Z0-9]+))$
116 # Regular expression which should only match correct module level names
117 const-rgx=(([A-Z_][A-Z1-9_]*)|(__.*__))$
119 # Regular expression which should only match correct class names
120 class-rgx=[A-Z_][a-zA-Z0-9]+$
122 # Regular expression which should only match correct function names
123 function-rgx=[a-zA-Z_][a-z0A-Z-9_]{2,30}$
125 # Regular expression which should only match correct method names
126 method-rgx=[a-zA-Z_][a-z0A-Z-9_]{2,30}$
128 # Regular expression which should only match correct instance attribute names
129 attr-rgx=[a-z_][a-z0-9_]{2,30}$
131 # Regular expression which should only match correct argument names
132 argument-rgx=[a-z_][a-z0-9_]{2,30}$
134 # Regular expression which should only match correct variable names
135 variable-rgx=[a-z_][a-z0-9_]{2,30}$
137 # Regular expression which should only match correct list comprehension /
138 # generator expression variable names
139 inlinevar-rgx=[A-Za-z_][A-Za-z0-9_]*$
141 # Good variable names which should always be accepted, separated by a comma
142 good-names=i,j,k,fp,ex,Run,_
144 # Bad variable names which should always be refused, separated by a comma
145 bad-names=foo,bar,baz,toto,tutu,tata
147 # List of builtins function names that should not be used, separated by a comma
148 bad-functions=map,filter,apply,input
152 # * unused variables / imports
153 # * undefined variables
154 # * redefinition of variable from builtins or from an outer scope
155 # * use of variable before assigment
159 # Tells wether we should check for unused import in __init__ files.
162 # A regular expression matching names used for dummy variables (i.e. not used).
163 dummy-variables-rgx=_|dummy
165 # List of additional names supposed to be defined in builtins. Remember that
166 # you should avoid to define new builtins when possible.
170 # try to find bugs in the code using type inference
174 # Tells wether missing members accessed in mixin class should be ignored. A
175 # mixin class is detected if its name ends with "mixin" (case insensitive).
176 ignore-mixin-members=yes
178 # When zope mode is activated, consider the acquired-members option to ignore
179 # access to some undefined attributes.
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
188 # * methods without self as first argument
189 # * overridden methods signature
190 # * access only to existant members via self
191 # * attributes not defined in the __init__ method
192 # * supported interfaces implementation
197 # List of interface methods to ignore, separated by a comma. This is used for
198 # instance to not check methods defines in Zope's Interface base class.
199 ignore-iface-methods=isImplementedBy,deferred,extends,names,namesAndDescriptions,queryDescriptionFor,getBases,getDescriptionFor,getDoc,getName,getTaggedValue,getTaggedValueTags,isEqualOrExtendedBy,setTaggedValue,isImplementedByInstancesOf,adaptWith,is_implemented_by
201 # List of method names used to declare (i.e. assign) instance attributes.
202 defining-attr-methods=__init__,__new__,setUp
206 # * external modules dependencies
207 # * relative / wildcard imports
209 # * uses of deprecated modules
213 # Deprecated modules which should not be used, separated by a comma
214 deprecated-modules=regsub,string,TERMIOS,Bastion,rexec
216 # Create a graph of every (i.e. internal and external) dependencies in the
217 # given file (report R0402 must not be disabled)
220 # Create a graph of external dependencies in the given file (report R0402 must
224 # Create a graph of internal dependencies in the given file (report R0402 must
229 # checks for sign of poor/misdesign:
230 # * number of methods, attributes, local variables...
231 # * size, complexity of functions, methods
235 # Maximum number of arguments for function / method
238 # Maximum number of locals for function / method body
241 # Maximum number of return / yield for function / method body
244 # Maximum number of branch for function / method body
247 # Maximum number of statements in function / method body
250 # Maximum number of parents for a class (see R0901).
253 # Maximum number of attributes for a class (see R0902).
256 # Minimum number of public methods for a class (see R0903).
259 # Maximum number of public methods for a class (see R0904).
260 max-public-methods=20
264 # * unauthorized constructions
265 # * strict indentation
267 # * use of <> instead of !=
271 # Maximum number of characters on a single line.
274 # Maximum number of lines in a module
275 max-module-lines=1000
277 # String used as indentation unit. This is usually " " (4 spaces) or "\t" (1
282 # checks for similarities and duplicated code. This computation may be
283 # memory / CPU intensive, so you should disable it if you experiments some
288 # Minimum lines number of a similarity.
289 min-similarity-lines=4
291 # Ignore comments when computing similarities.
294 # Ignore docstrings when computing similarities.
295 ignore-docstrings=yes
299 # * warning notes in the code like FIXME, XXX
300 # * PEP 263: source code with non ascii character but no encoding declaration
304 # List of note tags to take in consideration, separated by a comma.