comparison mxtool/.pylintrc @ 11514:dc3c8df55905

added support for pylint and fixed errors/warnings it found
author Doug Simon <doug.simon@oracle.com>
date Tue, 03 Sep 2013 16:33:41 +0200
parents
children
comparison
equal deleted inserted replaced
11513:8d4e5e08d83f 11514:dc3c8df55905
1 [MASTER]
2
3 # Specify a configuration file.
4 #rcfile=
5
6 # Python code to execute, usually for sys.path manipulation such as
7 # pygtk.require().
8 #init-hook=
9
10 # Profiled execution.
11 profile=no
12
13 # Add files or directories to the blacklist. They should be base names, not
14 # paths.
15 ignore=CVS
16
17 # Pickle collected data for later comparisons.
18 persistent=yes
19
20 # List of plugins (as comma separated values of python modules names) to load,
21 # usually to register additional checkers.
22 load-plugins=
23
24
25 [MESSAGES CONTROL]
26
27 # Enable the message, report, category or checker with the given id(s). You can
28 # either give multiple identifier separated by comma (,) or put this option
29 # multiple time. See also the "--disable" option for examples.
30 #enable=
31
32 # Disable the message, report, category or checker with the given id(s). You
33 # can either give multiple identifiers separated by comma (,) or put this
34 # option multiple times (only on the command line, not in the configuration
35 # file where it should appear only once).You can also use "--disable=all" to
36 # disable everything first and then reenable specific checks. For example, if
37 # you want to run only the similarities checker, you can use "--disable=all
38 # --enable=similarities". If you want to run only the classes checker, but have
39 # no Warning level messages displayed, use"--disable=all --enable=classes
40 # --disable=W"
41 disable=attribute-defined-outside-init,
42 bare-except,global-statement,protected-access,
43 redefined-outer-name,unused-argument,star-args,
44 old-style-class,too-many-lines,pointless-string-statement,
45
46 [REPORTS]
47
48 # Set the output format. Available formats are text, parseable, colorized, msvs
49 # (visual studio) and html. You can also give a reporter class, eg
50 # mypackage.mymodule.MyReporterClass.
51 output-format=text
52
53 # Put messages in a separate file for each module / package specified on the
54 # command line instead of printing them on stdout. Reports (if any) will be
55 # written in a file name "pylint_global.[txt|html]".
56 files-output=no
57
58 # Tells whether to display a full report or only the messages
59 reports=no
60
61 # Python expression which should return a note less than 10 (10 is the highest
62 # note). You have access to the variables errors warning, statement which
63 # respectively contain the number of errors / warnings messages and the total
64 # number of statements analyzed. This is used by the global evaluation report
65 # (RP0004).
66 evaluation=10.0 - ((float(5 * error + warning + refactor + convention) / statement) * 10)
67
68 # Add a comment according to your evaluation note. This is used by the global
69 # evaluation report (RP0004).
70 comment=no
71
72 # Template used to display messages. This is a python new-style format string
73 # used to format the massage information. See doc for all details
74 #msg-template=
75
76
77 [BASIC]
78
79 # Required attributes for module, separated by a comma
80 required-attributes=
81
82 # List of builtins function names that should not be used, separated by a comma
83 bad-functions=filter,apply,input
84
85 # Regular expression which should only match correct module names
86 module-rgx=(([a-z_][a-z0-9_]*)|([A-Z][a-zA-Z0-9]+))$
87
88 # Regular expression which should only match correct module level names
89 const-rgx=_[a-zA-Z0-9_]{2,30}$
90
91 # Regular expression which should only match correct class names
92 class-rgx=[A-Z_][a-zA-Z0-9]+$
93
94 # Regular expression which should only match correct function names
95 function-rgx=[a-z_][a-zA-Z0-9_]{1,50}$
96
97 # Regular expression which should only match correct method names
98 method-rgx=[a-z_][a-zA-Z0-9_]{1,50}$
99
100 # Regular expression which should only match correct instance attribute names
101 attr-rgx=[a-z_][a-zA-Z0-9_]{2,30}$
102
103 # Regular expression which should only match correct argument names
104 argument-rgx=[a-z_][a-zA-Z0-9_]{0,30}$
105
106 # Regular expression which should only match correct variable names
107 variable-rgx=[a-z_][a-zA-Z0-9_]{0,30}$
108
109 # Regular expression which should only match correct attribute names in class
110 # bodies
111 class-attribute-rgx=([A-Za-z_][A-Za-z0-9_]{2,30}|(__.*__))$
112
113 # Regular expression which should only match correct list comprehension /
114 # generator expression variable names
115 inlinevar-rgx=[A-Za-z_][A-Za-z0-9_]*$
116
117 # Good variable names which should always be accepted, separated by a comma
118 good-names=i,j,k,ex,Run,_
119
120 # Bad variable names which should always be refused, separated by a comma
121 bad-names=foo,bar,baz,toto,tutu,tata
122
123 # Regular expression which should only match function or class names that do
124 # not require a docstring.
125 no-docstring-rgx=.*
126
127 # Minimum line length for functions/classes that require docstrings, shorter
128 # ones are exempt.
129 docstring-min-length=-1
130
131
132 [FORMAT]
133
134 # Maximum number of characters on a single line.
135 max-line-length=300
136
137 # Regexp for a line that is allowed to be longer than the limit.
138 ignore-long-lines=^\s*(# )?<?https?://\S+>?$
139
140 # Maximum number of lines in a module
141 max-module-lines=1000
142
143 # String used as indentation unit. This is usually " " (4 spaces) or "\t" (1
144 # tab).
145 indent-string=' '
146
147
148 [MISCELLANEOUS]
149
150 # List of note tags to take in consideration, separated by a comma.
151 notes=FIXME,XXX,TODO
152
153
154 [SIMILARITIES]
155
156 # Minimum lines number of a similarity.
157 min-similarity-lines=4
158
159 # Ignore comments when computing similarities.
160 ignore-comments=yes
161
162 # Ignore docstrings when computing similarities.
163 ignore-docstrings=yes
164
165 # Ignore imports when computing similarities.
166 ignore-imports=no
167
168
169 [TYPECHECK]
170
171 # Tells whether missing members accessed in mixin class should be ignored. A
172 # mixin class is detected if its name ends with "mixin" (case insensitive).
173 ignore-mixin-members=yes
174
175 # List of classes names for which member attributes should not be checked
176 # (useful for classes with attributes dynamically set).
177 ignored-classes=SQLObject
178
179 # When zope mode is activated, add a predefined set of Zope acquired attributes
180 # to generated-members.
181 zope=no
182
183 # List of members which are set dynamically and missed by pylint inference
184 # system, and so shouldn't trigger E0201 when accessed. Python regular
185 # expressions are accepted.
186 generated-members=REQUEST,acl_users,aq_parent
187
188
189 [VARIABLES]
190
191 # Tells whether we should check for unused import in __init__ files.
192 init-import=no
193
194 # A regular expression matching the beginning of the name of dummy variables
195 # (i.e. not used).
196 dummy-variables-rgx=_$|dummy
197
198 # List of additional names supposed to be defined in builtins. Remember that
199 # you should avoid to define new builtins when possible.
200 additional-builtins=
201
202
203 [CLASSES]
204
205 # List of interface methods to ignore, separated by a comma. This is used for
206 # instance to not check methods defines in Zope's Interface base class.
207 ignore-iface-methods=isImplementedBy,deferred,extends,names,namesAndDescriptions,queryDescriptionFor,getBases,getDescriptionFor,getDoc,getName,getTaggedValue,getTaggedValueTags,isEqualOrExtendedBy,setTaggedValue,isImplementedByInstancesOf,adaptWith,is_implemented_by
208
209 # List of method names used to declare (i.e. assign) instance attributes.
210 defining-attr-methods=__init__,__new__,setUp
211
212 # List of valid names for the first argument in a class method.
213 valid-classmethod-first-arg=cls
214
215 # List of valid names for the first argument in a metaclass class method.
216 valid-metaclass-classmethod-first-arg=mcs
217
218
219 [DESIGN]
220
221 # Maximum number of arguments for function / method
222 max-args=5
223
224 # Argument names that match this expression will be ignored. Default to name
225 # with leading underscore
226 ignored-argument-names=_.*
227
228 # Maximum number of locals for function / method body
229 max-locals=15
230
231 # Maximum number of return / yield for function / method body
232 max-returns=6
233
234 # Maximum number of branch for function / method body
235 max-branches=12
236
237 # Maximum number of statements in function / method body
238 max-statements=50
239
240 # Maximum number of parents for a class (see R0901).
241 max-parents=7
242
243 # Maximum number of attributes for a class (see R0902).
244 max-attributes=7
245
246 # Minimum number of public methods for a class (see R0903).
247 min-public-methods=2
248
249 # Maximum number of public methods for a class (see R0904).
250 max-public-methods=20
251
252
253 [IMPORTS]
254
255 # Deprecated modules which should not be used, separated by a comma
256 deprecated-modules=regsub,TERMIOS,Bastion,rexec
257
258 # Create a graph of every (i.e. internal and external) dependencies in the
259 # given file (report RP0402 must not be disabled)
260 import-graph=
261
262 # Create a graph of external dependencies in the given file (report RP0402 must
263 # not be disabled)
264 ext-import-graph=
265
266 # Create a graph of internal dependencies in the given file (report RP0402 must
267 # not be disabled)
268 int-import-graph=
269
270
271 [EXCEPTIONS]
272
273 # Exceptions that will emit a warning when being caught. Defaults to
274 # "Exception"
275 overgeneral-exceptions=Exception