src/eric7/Plugins/CheckerPlugins/CodeStyleChecker/Security/SecurityChecker.py

branch
eric7
changeset 11142
2f0fb22c1d63
parent 11136
437db2f032fd
child 11145
d328a7b74fd8
equal deleted inserted replaced
11141:2f5f73c51c7c 11142:2f0fb22c1d63
138 @type bool 138 @type bool
139 @param args dictionary of arguments for the security checks 139 @param args dictionary of arguments for the security checks
140 @type dict 140 @type dict
141 """ 141 """
142 self.__select = tuple(select) 142 self.__select = tuple(select)
143 self.__ignore = ("",) if select else tuple(ignore) 143 self.__ignore = tuple(ignore)
144 self.__expected = expected[:] 144 self.__expected = expected[:]
145 self.__repeat = repeat 145 self.__repeat = repeat
146 self.__filename = filename 146 self.__filename = filename
147 self.__source = source[:] 147 self.__source = source[:]
148 self.__tree = copy.deepcopy(tree) 148 self.__tree = copy.deepcopy(tree)
169 @param code message code to check for 169 @param code message code to check for
170 @type str 170 @type str
171 @return flag indicating to ignore the given code 171 @return flag indicating to ignore the given code
172 @rtype bool 172 @rtype bool
173 """ 173 """
174 return code.startswith(self.__ignore) and not code.startswith(self.__select) 174 return (
175 code in self.__ignore
176 or (code.startswith(self.__ignore) and not code.startswith(self.__select))
177 )
175 178
176 def reportError(self, lineNumber, offset, code, severity, confidence, *args): 179 def reportError(self, lineNumber, offset, code, severity, confidence, *args):
177 """ 180 """
178 Public method to record an issue. 181 Public method to record an issue.
179 182

eric ide

mercurial