1 | # lint Python modules using external checkers. |
---|
2 | # |
---|
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 |
---|
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 | # This checker also defines the following reports: |
---|
10 | # * R0001: Total errors / warnings |
---|
11 | # * R0002: % errors / warnings by module |
---|
12 | # * R0003: Messages |
---|
13 | # * R0004: Global evaluation |
---|
14 | # |
---|
15 | [MASTER] |
---|
16 | # Add <file or directory> to the black list. It should be a base name, not a |
---|
17 | # path. You may set this option multiple times. |
---|
18 | ignore=CVS |
---|
19 | |
---|
20 | # Pickle collected data for later comparisons. |
---|
21 | persistent=yes |
---|
22 | |
---|
23 | # Set the cache size for astng objects. |
---|
24 | cache-size=500 |
---|
25 | |
---|
26 | |
---|
27 | |
---|
28 | [REPORTS] |
---|
29 | # Tells wether to display a full report or only the messages |
---|
30 | reports=yes |
---|
31 | |
---|
32 | # Use HTML as output format instead of text |
---|
33 | html=no |
---|
34 | |
---|
35 | # Use a parseable text output format, so your favorite text editor will be able |
---|
36 | # to jump to the line corresponding to a message. |
---|
37 | parseable=no |
---|
38 | |
---|
39 | # Colorizes text output using ansi escape codes |
---|
40 | color=no |
---|
41 | |
---|
42 | # Put messages in a separate file for each module / package specified on the |
---|
43 | # command line instead of printing them on stdout. Reports (if any) will be |
---|
44 | # written in a file name "pylint_global.[txt|html]". |
---|
45 | files-output=no |
---|
46 | |
---|
47 | # Python expression which should return a note less than 10 (10 is the highest |
---|
48 | # note).You have access to the variables errors warning, statement which |
---|
49 | # respectivly contain the number of errors / warnings messages and the total |
---|
50 | # number of statements analyzed. This is used by the global evaluation report |
---|
51 | # (R0004). |
---|
52 | evaluation=10.0 - ((float(5 * error + warning + refactor + convention) / statement) * 10) |
---|
53 | |
---|
54 | # Add a comment according to your evaluation note. This is used by the global |
---|
55 | # evaluation report (R0004). |
---|
56 | comment=no |
---|
57 | |
---|
58 | # Include message's id in output |
---|
59 | include-ids=yes |
---|
60 | |
---|
61 | |
---|
62 | |
---|
63 | # checks for |
---|
64 | # * unused variables / imports |
---|
65 | # * undefined variables |
---|
66 | # * redefinition of variable from builtins or from an outer scope |
---|
67 | # * use of variable before assigment |
---|
68 | # |
---|
69 | [VARIABLES] |
---|
70 | # Enable / disable this checker |
---|
71 | enable-variables=yes |
---|
72 | |
---|
73 | # Tells wether we should check for unused import in __init__ files. |
---|
74 | init-import=no |
---|
75 | |
---|
76 | # List of variable names used for dummy variables (i.e. not used). |
---|
77 | dummy-variables=_,_1,_2,_3,_4,_5,dummy |
---|
78 | |
---|
79 | |
---|
80 | |
---|
81 | # checks for : |
---|
82 | # * doc strings |
---|
83 | # * modules / classes / functions / methods / arguments / variables name |
---|
84 | # * number of arguments, local variables, branchs, returns and statements in |
---|
85 | # functions, methods |
---|
86 | # * required module attributes |
---|
87 | # * dangerous default values as arguments |
---|
88 | # * redefinition of function / method / class |
---|
89 | # * uses of the global statement |
---|
90 | # |
---|
91 | # This checker also defines the following reports: |
---|
92 | # * R0101: Statistics by type |
---|
93 | # |
---|
94 | [BASIC] |
---|
95 | # Enable / disable this checker |
---|
96 | enable-basic=yes |
---|
97 | |
---|
98 | # Required attributes for module, separated by a comma |
---|
99 | required-attributes= |
---|
100 | |
---|
101 | # Regular expression which should only match functions or classes name which do |
---|
102 | # not require a docstring |
---|
103 | no-docstring-rgx=.* |
---|
104 | |
---|
105 | # Minimal length for module / class / function / method / argument / variable |
---|
106 | # names |
---|
107 | min-name-length=1 |
---|
108 | |
---|
109 | # Regular expression which should only match correct module names |
---|
110 | module-rgx=(([a-z_][a-z0-9_]*)|([A-Z][a-zA-Z0-9]+))$ |
---|
111 | |
---|
112 | # Regular expression which should only match correct class names |
---|
113 | class-rgx=[A-Z_][a-zA-Z0-9]+$ |
---|
114 | |
---|
115 | # Regular expression which should only match correct function names |
---|
116 | function-rgx=[a-z_][A-Za-z0-9_]*$ |
---|
117 | |
---|
118 | # Regular expression which should only match correct method names |
---|
119 | method-rgx=[a-z_][A-Za-z0-9_]*$ |
---|
120 | |
---|
121 | # Regular expression which should only match correct argument names |
---|
122 | argument-rgx=[a-z_][A-Za-z0-9_]*$ |
---|
123 | |
---|
124 | # Regular expression which should only match correct variable names |
---|
125 | variable-rgx=[a-z_][A-Za-z0-9_]*$ |
---|
126 | |
---|
127 | # Good variable names which should always be accepted, separated by a comma |
---|
128 | good-names=i,j,k,ex,Run,_ |
---|
129 | |
---|
130 | # Bad variable names which should always be refused, separated by a comma |
---|
131 | bad-names=foo,bar,baz,toto,tutu,tata |
---|
132 | |
---|
133 | # List of builtins function names that should not be used, separated by a comma |
---|
134 | bad-functions=apply,input |
---|
135 | |
---|
136 | |
---|
137 | |
---|
138 | # checks for sign of poor/misdesign: |
---|
139 | # * number of methods, attributes, local variables... |
---|
140 | # * size, complexity of functions, methods |
---|
141 | # |
---|
142 | [DESIGN] |
---|
143 | # Enable / disable this checker |
---|
144 | enable-design=yes |
---|
145 | |
---|
146 | # Maximum number of arguments for function / method |
---|
147 | max-args=15 |
---|
148 | |
---|
149 | # Maximum number of locals for function / method body |
---|
150 | max-locals=15 |
---|
151 | |
---|
152 | # Maximum number of return / yield for function / method body |
---|
153 | max-returns=6 |
---|
154 | |
---|
155 | # Maximum number of branch for function / method body |
---|
156 | max-branchs=12 |
---|
157 | |
---|
158 | # Maximum number of statements in function / method body |
---|
159 | max-statements=50 |
---|
160 | |
---|
161 | # Maximum number of parents for a class (see R0901). |
---|
162 | max-parents=7 |
---|
163 | |
---|
164 | # Maximum number of attributes for a class (see R0902). |
---|
165 | max-attributes=7 |
---|
166 | |
---|
167 | # Minimum number of public methods for a class (see R0903). |
---|
168 | min-public-methods=2 |
---|
169 | |
---|
170 | # Maximum number of public methods for a class (see R0904). |
---|
171 | max-public-methods=20 |
---|
172 | |
---|
173 | |
---|
174 | |
---|
175 | # checks for : |
---|
176 | # * methods without self as first argument |
---|
177 | # * overriden methods signature |
---|
178 | # * access only to existant members via self |
---|
179 | # * attributes not defined in the __init__ method |
---|
180 | # * supported interfaces implementation |
---|
181 | # * unreachable code |
---|
182 | # |
---|
183 | [CLASSES] |
---|
184 | # Enable / disable this checker |
---|
185 | enable-classes=yes |
---|
186 | |
---|
187 | # List of interface methods to ignore, separated by a comma. This is used for |
---|
188 | # instance to not check methods defines in Zope's Interface base class. |
---|
189 | ignore-iface-methods=isImplementedBy,deferred,extends,names,namesAndDescriptions,queryDescriptionFor,getBases,getDescriptionFor,getDoc,getName,getTaggedValue,getTaggedValueTags,isEqualOrExtendedBy,setTaggedValue,isImplementedByInstancesOf,adaptWith,is_implemented_by |
---|
190 | |
---|
191 | # Tells wether missing members accessed in mixin class should be ignored. A |
---|
192 | # mixin class is detected if its name ends with "mixin" (case insensitive). |
---|
193 | ignore-mixin-members=yes |
---|
194 | |
---|
195 | |
---|
196 | |
---|
197 | # checks for |
---|
198 | # * external modules dependencies |
---|
199 | # * relative / wildcard imports |
---|
200 | # * cyclic imports |
---|
201 | # * uses of deprecated modules |
---|
202 | # |
---|
203 | # This checker also defines the following reports: |
---|
204 | # * R0401: External dependencies |
---|
205 | # * R0402: Modules dependencies graph |
---|
206 | # |
---|
207 | [IMPORTS] |
---|
208 | # Enable / disable this checker |
---|
209 | enable-imports=no |
---|
210 | |
---|
211 | # Deprecated modules which should not be used, separated by a comma |
---|
212 | deprecated-modules=regsub,string,TERMIOS,Bastion,rexec |
---|
213 | |
---|
214 | # Create a graph of every (i.e. internal and external) dependencies in the given |
---|
215 | # file (report R0402 must not be disabled) |
---|
216 | import-graph= |
---|
217 | |
---|
218 | # Create a graph of external dependencies in the given file (report R0402 must |
---|
219 | # not be disabled) |
---|
220 | ext-import-graph= |
---|
221 | |
---|
222 | # Create a graph of internal dependencies in the given file (report R0402 must |
---|
223 | # not be disabled) |
---|
224 | int-import-graph= |
---|
225 | |
---|
226 | |
---|
227 | |
---|
228 | # checks for |
---|
229 | # * excepts without exception filter |
---|
230 | # * string exceptions |
---|
231 | # |
---|
232 | [EXCEPTIONS] |
---|
233 | # Enable / disable this checker |
---|
234 | enable-exceptions=yes |
---|
235 | |
---|
236 | |
---|
237 | |
---|
238 | # checks for : |
---|
239 | # * unauthorized constructions |
---|
240 | # * strict indentation |
---|
241 | # * line length |
---|
242 | # * use of <> instead of != |
---|
243 | # |
---|
244 | [FORMAT] |
---|
245 | # Enable / disable this checker |
---|
246 | enable-format=no |
---|
247 | |
---|
248 | # Maximum number of characters on a single line. |
---|
249 | max-line-length=80 |
---|
250 | |
---|
251 | # Maximum number of lines in a module |
---|
252 | max-module-lines=1000 |
---|
253 | |
---|
254 | # String used as indentation unit. This is usually " " (4 spaces) or "\t" (1 tab). |
---|
255 | indent-string=' ' |
---|
256 | |
---|
257 | |
---|
258 | |
---|
259 | # does not check anything but gives some raw metrics : |
---|
260 | # * total number of lines |
---|
261 | # * total number of code lines |
---|
262 | # * total number of docstring lines |
---|
263 | # * total number of comments lines |
---|
264 | # * total number of empty lines |
---|
265 | # |
---|
266 | # This checker also defines the following reports: |
---|
267 | # * R0701: Raw metrics |
---|
268 | # |
---|
269 | [METRICS] |
---|
270 | # Enable / disable this checker |
---|
271 | enable-metrics=yes |
---|
272 | |
---|
273 | |
---|
274 | |
---|
275 | # checks for: |
---|
276 | # * warning notes in the code like FIXME, XXX |
---|
277 | # * PEP 263: source code with non ascii character but no encoding declaration |
---|
278 | # |
---|
279 | [MISCELLANEOUS] |
---|
280 | # Enable / disable this checker |
---|
281 | enable-miscellaneous=yes |
---|
282 | |
---|
283 | # List of note tags to take in consideration, separated by a comma. Default to |
---|
284 | # FIXME, XXX, TODO |
---|
285 | notes=FIXME,XXX,TODO |
---|
286 | |
---|
287 | |
---|
288 | |
---|
289 | # checks for similarities and duplicated code. This computation may be |
---|
290 | # memory / CPU intensive, so you should disable it if you experiments some |
---|
291 | # problems. |
---|
292 | # |
---|
293 | # This checker also defines the following reports: |
---|
294 | # * R0801: Duplication |
---|
295 | # |
---|
296 | [SIMILARITIES] |
---|
297 | # Enable / disable this checker |
---|
298 | enable-similarities=yes |
---|
299 | |
---|
300 | # Minimum lines number of a similarity. |
---|
301 | min-similarity-lines=4 |
---|
302 | |
---|
303 | # Ignore comments when computing similarities. |
---|
304 | ignore-comments=yes |
---|
305 | |
---|
306 | |
---|
307 | |
---|