-
Notifications
You must be signed in to change notification settings - Fork 2
/
pycheck.rc
224 lines (154 loc) · 6.47 KB
/
pycheck.rc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
# Sample defaults file for PyChecker 0.8.17
# This file should be called: .pycheckrc
# It should be placed in your home directory (value of $HOME).
# If $HOME is not set, it will look in the current directory.
# bool: only warn about files passed on the command line
only = 0
# int: the maximum number of warnings to be displayed
limit = 0
# bool: warnings for Doc Strings
noDocModule = 1
noDocClass = 1
noDocFunc = 1
# bool: when checking if class data members (attributes) are set
# check all members or __init__() only
onlyCheckInitForMembers = 1
# bool: warn when all module variables are not used (including private vars)
allVariablesUsed = 1
# bool: produce warnings for each occurrence of a warning for global (xxx)
reportAllGlobals = 1
# bool: warn when private module variables are not used (_var)
privateVariableUsed = 1
# bool: warn when imports are not used
importUsed = 1
# bool: warn when import and from ... import are used for same module
mixImport = 1
# bool: warn when imports are not used in __init__.py
packageImportUsed = 1
# bool: warn when a module reimports another module (import & from/import)
moduleImportErrors = 1
# bool: warn when modules import themselves
reimportSelf = 1
# bool: warn when local variables are not used
localVariablesUsed = 1
# bool: assume a, b, and c are used in this case: a, b, c = func()
unusedLocalTuple = 1
# bool: warn when class attributes (data members) are unused
membersUsed = 1
# bool: warn when Subclass.__init__ is not called in a subclass
baseClassInitted = 1
# bool: warn when Subclass needs to override methods that only throw exceptions
abstractClasses = 1
# bool: warn when __init__ is defined in a subclass
initDefinedInSubclass = 1
# bool: warn when __init__ returns None
returnNoneFromInit = 1
# bool: warn when code is not reachable
unreachableCode = 1
# bool: warn when a constant is used in a conditional statement (if '':)
constantConditions = 1
# bool: warn when 1 is used in a conditional statement, (if 1: while 1: etc)
constant1 = 1
# bool: warn when iterating over a string in a for loop
stringIteration = 1
# bool: warn when setting a variable to different types
inconsistentTypes = 1
# bool: warn when setting a tuple of variables to a non-sequence (a, b = None)
unpackNonSequence = 1
# bool: warn when setting a tuple of variables to the wrong length (a, b = 1,)
unpackLength = 1
# bool: warn when using strings exceptions or
# other classes not derived from Exception to raise/catch exceptions
badExceptions = 1
# bool: warn when statements appear to have no effect
noEffect = 1
# bool: warn when using (expr % 1), it has no effect on integers and strings
modulo1 = 1
# bool: warn if using (expr is const-literal),
# doesn't always work on integers and strings
isLiteral = 1
# bool: warn when possibly using string.find() improperly (if s.find():)
stringFind = 1
# bool: warn when using a deprecated module or function
deprecated = 1
# bool: warn when the class attribute does not exist
classAttrExists = 1
# bool: warn when calling an attribute not a method
callingAttribute = 1
# bool: warn when using named arguments: func(a=1, b=2), where def func(a, b):
# def func2(a, b, **kw): doesn't generate a warning
namedArgs = 1
# str: name of 'self' parameter
methodArgName = 'self'
# list of str: names of first parameter to classmethods
classmethodArgNames = ['cls', 'klass']
# bool: warn when method/function arguments are unused
argumentsUsed = 1
# bool: ignore if self is unused in methods
ignoreSelfUnused = 0
# bool: warn if functions/classes/methods names are redefined in same scope
redefiningFunction = 1
# bool: check if an overriden method has the same signature
# as base class method (__init__() methods are not checked)
checkOverridenMethods = 1
# bool: check if a special (reserved) method has the correct signature
# and is known (these are methods that begin and end with __
checkSpecialMethods = 1
# int: warnings for code complexity, max value before generating a warning
maxLines = 200
maxBranches = 50
maxReturns = 10
maxArgs = 10
maxLocals = 40
maxReferences = 5
# bool: ignore all warnings from standard library components
# (this includes anything under the standard library, eg, site-packages)
ignoreStandardLibrary = 0
# list of strings: ignore unused locals/arguments if name is one of
unusedNames = [ '_', 'empty', 'unused', 'dummy', ]
# list of strings: ignore warnings generated from these modules
blacklist = [ 'decimal']
# list of strings: ignore global variables not used if name is one of
variablesToIgnore = [ '__all__', '__version__', '__copyright__', ]
# bool: print the PyChecker parse of modules, classes, etc.
printParse = 0
# bool: turn debugging of PyChecker on
debug = 0
# bool: check that attributes of objects exist
checkObjectAttrs = 1
# bool: various warnings about incorrect usage of __slots__
slots = 1
# bool: check if __slots__ is empty
emptySlots = 1
# bool: check for using properties in classic classes
classicProperties = 1
# bool: check for integer division (may be problem between Python versions)
intDivide = 1
# bool: check if local variables shadow a global variable with same name
shadows = 1
# bool: check if local variables shadow a builtin variable with same name
shadowBuiltins = 1
# bool: check if input() is used, which is a security problem, use raw_input()
usesInput = 1
# bool: check if using a constant string to getattr()/setattr()
constAttr = 1
# bool: check for using +variable, since it is almost always has no effect
unaryPositive = 1
# bool: check for modifying a parameter with a default value
# (value must be: list, dict, instance)
# modifying the value may have undesirable/unexpected side-effects
modifyDefaultValue = 1
# bool: check if the exec statement is used (possible security problem)
usesExec = 1
# bool: check consistent return values
checkReturnValues = 1
# bool: check if using implict and explicit return values
checkImplicitReturns = 1
# dict: suppress warnings, key is module.class.method or module.function
# value is a string of command line arguments (can omit -- for long args)
# { 'module1': 'no-namedargs maxlines=0',
# 'module2.my_func': 'argsused',
# 'module3.my_class': 'no-initreturn', }
suppressions = {}
# dict: suppress warnings where keys can be regular expressions
suppressionRegexs = {}