1 | # lint Python modules using external checkers. |
---|
2 | # |
---|
3 | # This is the main checker controlling the other ones and the reports |
---|
4 | # generation. It is itself both a raw checker and an astng checker in order |
---|
5 | # to: |
---|
6 | # * handle message activation / deactivation at the module level |
---|
7 | # * handle some basic but necessary stats'data (number of classes, methods...) |
---|
8 | # |
---|
9 | [MASTER] |
---|
10 | # Specify a configuration file. |
---|
11 | #rcfile= |
---|
12 | |
---|
13 | # Python code to execute, usually for sys.path manipulation such as |
---|
14 | # pygtk.require(). |
---|
15 | #init-hook= |
---|
16 | |
---|
17 | # Profiled execution. |
---|
18 | profile=no |
---|
19 | |
---|
20 | # Add <file or directory> to the black list. It should be a base name, not a |
---|
21 | # path. You may set this option multiple times. |
---|
22 | ignore=CVS |
---|
23 | |
---|
24 | # Pickle collected data for later comparisons. |
---|
25 | persistent=yes |
---|
26 | |
---|
27 | # Set the cache size for astng objects. |
---|
28 | cache-size=500 |
---|
29 | |
---|
30 | # List of plugins (as comma separated values of python modules names) to load, |
---|
31 | # usually to register additional checkers. |
---|
32 | load-plugins= |
---|
33 | |
---|
34 | |
---|
35 | [MESSAGES CONTROL] |
---|
36 | |
---|
37 | # Enable only checker(s) with the given id(s). This option conflicts with the |
---|
38 | # disable-checker option |
---|
39 | #enable-checker= |
---|
40 | |
---|
41 | # Enable all checker(s) except those with the given id(s). This option |
---|
42 | # conflicts with the enable-checker option |
---|
43 | #disable-checker= |
---|
44 | |
---|
45 | # Enable all messages in the listed categories (IRCWEF). |
---|
46 | #enable-msg-cat= |
---|
47 | |
---|
48 | # Disable all messages in the listed categories (IRCWEF). |
---|
49 | disable-msg-cat=I |
---|
50 | |
---|
51 | # Enable the message(s) with the given id(s). |
---|
52 | #enable-msg= |
---|
53 | |
---|
54 | # Disable the message(s) with the given id(s). |
---|
55 | disable-msg=W0102, W0108, W0201, W0613, W0704, C0111, C0322, C0323, C0324, R0201, E1101, E0211, E0213 |
---|
56 | |
---|
57 | |
---|
58 | [REPORTS] |
---|
59 | |
---|
60 | # Set the output format. Available formats are text, parseable, colorized, msvs |
---|
61 | # (visual studio) and html |
---|
62 | output-format=html |
---|
63 | |
---|
64 | # Include message's id in output |
---|
65 | include-ids=yes |
---|
66 | |
---|
67 | # Put messages in a separate file for each module / package specified on the |
---|
68 | # command line instead of printing them on stdout. Reports (if any) will be |
---|
69 | # written in a file name "pylint_global.[txt|html]". |
---|
70 | files-output=no |
---|
71 | |
---|
72 | # Tells whether to display a full report or only the messages |
---|
73 | reports=yes |
---|
74 | |
---|
75 | # Python expression which should return a note less than 10 (10 is the highest |
---|
76 | # note). You have access to the variables errors warning, statement which |
---|
77 | # respectively contain the number of errors / warnings messages and the total |
---|
78 | # number of statements analyzed. This is used by the global evaluation report |
---|
79 | # (R0004). |
---|
80 | evaluation=10.0 - ((float(5 * error + warning + refactor + convention) / statement) * 10) |
---|
81 | |
---|
82 | # Add a comment according to your evaluation note. This is used by the global |
---|
83 | # evaluation report (R0004). |
---|
84 | comment=yes |
---|
85 | |
---|
86 | # Enable the report(s) with the given id(s). |
---|
87 | #enable-report= |
---|
88 | |
---|
89 | # Disable the report(s) with the given id(s). |
---|
90 | #disable-report= |
---|
91 | |
---|
92 | |
---|
93 | # checks for : |
---|
94 | # * doc strings |
---|
95 | # * modules / classes / functions / methods / arguments / variables name |
---|
96 | # * number of arguments, local variables, branches, returns and statements in |
---|
97 | # functions, methods |
---|
98 | # * required module attributes |
---|
99 | # * dangerous default values as arguments |
---|
100 | # * redefinition of function / method / class |
---|
101 | # * uses of the global statement |
---|
102 | # |
---|
103 | [BASIC] |
---|
104 | |
---|
105 | # Required attributes for module, separated by a comma |
---|
106 | required-attributes= |
---|
107 | |
---|
108 | # Regular expression which should only match functions or classes name which do |
---|
109 | # not require a docstring |
---|
110 | no-docstring-rgx=__.*__ |
---|
111 | |
---|
112 | # Regular expression which should only match correct module names |
---|
113 | module-rgx=(([a-z_][a-z0-9_]*)|([A-Z][a-zA-Z0-9]+))$ |
---|
114 | |
---|
115 | # Regular expression which should only match correct module level names |
---|
116 | const-rgx=(([A-Z_][a-zA-Z0-9_]*)|(__.*__))$ |
---|
117 | |
---|
118 | # Regular expression which should only match correct class names |
---|
119 | class-rgx=[A-Z_][a-zA-Z0-9]+$ |
---|
120 | |
---|
121 | # Regular expression which should only match correct function names |
---|
122 | function-rgx=[a-zA-Z_][a-zA-Z0-9_]{2,40}$ |
---|
123 | |
---|
124 | # Regular expression which should only match correct method names |
---|
125 | method-rgx=[a-zA-Z_][a-zA-Z0-9_]{2,40}$ |
---|
126 | |
---|
127 | # Regular expression which should only match correct instance attribute names |
---|
128 | attr-rgx=[a-z_][a-z0-9_]{2,40}$ |
---|
129 | |
---|
130 | # Regular expression which should only match correct argument names |
---|
131 | argument-rgx=(([a-k_])|([a-z_][a-z0-9_]{1,40})|([a-z_][a-zA-Z0-9]{1,40}))$ |
---|
132 | |
---|
133 | # Regular expression which should only match correct variable names |
---|
134 | variable-rgx=(([a-k_])|([a-z_][a-z0-9_]{1,40})|([a-z_][a-zA-Z0-9]{1,40}))$ |
---|
135 | |
---|
136 | # Regular expression which should only match correct list comprehension / |
---|
137 | # generator expression variable names |
---|
138 | inlinevar-rgx=[A-Za-z_][A-Za-z0-9_]*$ |
---|
139 | |
---|
140 | # Good variable names which should always be accepted, separated by a comma |
---|
141 | good-names=Run |
---|
142 | |
---|
143 | # Bad variable names which should always be refused, separated by a comma |
---|
144 | bad-names=foo,bar,baz,quux,xyzzy,fred,wibble |
---|
145 | |
---|
146 | # List of builtins function names that should not be used, separated by a comma |
---|
147 | bad-functions=input |
---|
148 | |
---|
149 | |
---|
150 | # try to find bugs in the code using type inference |
---|
151 | # |
---|
152 | [TYPECHECK] |
---|
153 | |
---|
154 | # Tells whether missing members accessed in mixin class should be ignored. A |
---|
155 | # mixin class is detected if its name ends with "mixin" (case insensitive). |
---|
156 | ignore-mixin-members=yes |
---|
157 | |
---|
158 | # List of classes names for which member attributes should not be checked |
---|
159 | # (useful for classes with attributes dynamically set). |
---|
160 | ignored-classes=SQLObject |
---|
161 | |
---|
162 | # When zope mode is activated, add a predefined set of Zope acquired attributes |
---|
163 | # to generated-members. |
---|
164 | zope=yes |
---|
165 | |
---|
166 | # List of members which are set dynamically and missed by pylint inference |
---|
167 | # system, and so shouldn't trigger E0201 when accessed. |
---|
168 | generated-members=REQUEST,acl_users,aq_parent |
---|
169 | |
---|
170 | |
---|
171 | # checks for |
---|
172 | # * unused variables / imports |
---|
173 | # * undefined variables |
---|
174 | # * redefinition of variable from builtins or from an outer scope |
---|
175 | # * use of variable before assignment |
---|
176 | # |
---|
177 | [VARIABLES] |
---|
178 | |
---|
179 | # Tells whether we should check for unused import in __init__ files. |
---|
180 | init-import=no |
---|
181 | |
---|
182 | # A regular expression matching names used for dummy variables (i.e. not used). |
---|
183 | dummy-variables-rgx=_|dummy |
---|
184 | |
---|
185 | # List of additional names supposed to be defined in builtins. Remember that |
---|
186 | # you should avoid to define new builtins when possible. |
---|
187 | additional-builtins= |
---|
188 | |
---|
189 | |
---|
190 | # checks for : |
---|
191 | # * methods without self as first argument |
---|
192 | # * overridden methods signature |
---|
193 | # * access only to existent members via self |
---|
194 | # * attributes not defined in the __init__ method |
---|
195 | # * supported interfaces implementation |
---|
196 | # * unreachable code |
---|
197 | # |
---|
198 | [CLASSES] |
---|
199 | |
---|
200 | # List of interface methods to ignore, separated by a comma. This is used for |
---|
201 | # instance to not check methods defines in Zope's Interface base class. |
---|
202 | ignore-iface-methods=isImplementedBy,deferred,extends,names,namesAndDescriptions,queryDescriptionFor,getBases,getDescriptionFor,getDoc,getName,getTaggedValue,getTaggedValueTags,isEqualOrExtendedBy,setTaggedValue,isImplementedByInstancesOf,adaptWith,is_implemented_by |
---|
203 | |
---|
204 | # List of method names used to declare (i.e. assign) instance attributes. |
---|
205 | defining-attr-methods=__init__,__new__,setUp |
---|
206 | |
---|
207 | |
---|
208 | # checks for sign of poor/misdesign: |
---|
209 | # * number of methods, attributes, local variables... |
---|
210 | # * size, complexity of functions, methods |
---|
211 | # |
---|
212 | [DESIGN] |
---|
213 | |
---|
214 | # Maximum number of arguments for function / method |
---|
215 | max-args=6 |
---|
216 | |
---|
217 | # Maximum number of locals for function / method body |
---|
218 | max-locals=15 |
---|
219 | |
---|
220 | # Maximum number of return / yield for function / method body |
---|
221 | max-returns=8 |
---|
222 | |
---|
223 | # Maximum number of branch for function / method body |
---|
224 | max-branchs=12 |
---|
225 | |
---|
226 | # Maximum number of statements in function / method body |
---|
227 | max-statements=50 |
---|
228 | |
---|
229 | # Maximum number of parents for a class (see R0901). |
---|
230 | max-parents=7 |
---|
231 | |
---|
232 | # Maximum number of attributes for a class (see R0902). |
---|
233 | max-attributes=15 |
---|
234 | |
---|
235 | # Minimum number of public methods for a class (see R0903). |
---|
236 | min-public-methods=1 |
---|
237 | |
---|
238 | # Maximum number of public methods for a class (see R0904). |
---|
239 | max-public-methods=30 |
---|
240 | |
---|
241 | |
---|
242 | # checks for |
---|
243 | # * external modules dependencies |
---|
244 | # * relative / wildcard imports |
---|
245 | # * cyclic imports |
---|
246 | # * uses of deprecated modules |
---|
247 | # |
---|
248 | [IMPORTS] |
---|
249 | |
---|
250 | # Deprecated modules which should not be used, separated by a comma |
---|
251 | deprecated-modules=regsub,string,TERMIOS,Bastion,rexec |
---|
252 | |
---|
253 | # Create a graph of every (i.e. internal and external) dependencies in the |
---|
254 | # given file (report R0402 must not be disabled) |
---|
255 | import-graph= |
---|
256 | |
---|
257 | # Create a graph of external dependencies in the given file (report R0402 must |
---|
258 | # not be disabled) |
---|
259 | ext-import-graph= |
---|
260 | |
---|
261 | # Create a graph of internal dependencies in the given file (report R0402 must |
---|
262 | # not be disabled) |
---|
263 | int-import-graph= |
---|
264 | |
---|
265 | |
---|
266 | # checks for : |
---|
267 | # * unauthorized constructions |
---|
268 | # * strict indentation |
---|
269 | # * line length |
---|
270 | # * use of <> instead of != |
---|
271 | # |
---|
272 | [FORMAT] |
---|
273 | |
---|
274 | # Maximum number of characters on a single line. |
---|
275 | max-line-length=120 |
---|
276 | |
---|
277 | # Maximum number of lines in a module |
---|
278 | max-module-lines=2000 |
---|
279 | |
---|
280 | # String used as indentation unit. This is usually " " (4 spaces) or "\t" (1 |
---|
281 | # tab). |
---|
282 | indent-string=' ' |
---|
283 | |
---|
284 | |
---|
285 | # checks for: |
---|
286 | # * warning notes in the code like FIXME, XXX |
---|
287 | # * PEP 263: source code with non ascii character but no encoding declaration |
---|
288 | # |
---|
289 | [MISCELLANEOUS] |
---|
290 | |
---|
291 | # List of note tags to take in consideration, separated by a comma. |
---|
292 | notes=FIXME,XXX,TODO |
---|
293 | |
---|
294 | |
---|
295 | # checks for similarities and duplicated code. This computation may be |
---|
296 | # memory / CPU intensive, so you should disable it if you experiments some |
---|
297 | # problems. |
---|
298 | # |
---|
299 | [SIMILARITIES] |
---|
300 | |
---|
301 | # Minimum lines number of a similarity. |
---|
302 | min-similarity-lines=4 |
---|
303 | |
---|
304 | # Ignore comments when computing similarities. |
---|
305 | ignore-comments=yes |
---|
306 | |
---|
307 | # Ignore docstrings when computing similarities. |
---|
308 | ignore-docstrings=yes |
---|