diff -r 382f89c11e27 -r 646742c260bd eric6/Plugins/CheckerPlugins/CodeStyleChecker/CodeStyleCheckerDialog.py --- a/eric6/Plugins/CheckerPlugins/CodeStyleChecker/CodeStyleCheckerDialog.py Mon Jun 08 20:08:27 2020 +0200 +++ b/eric6/Plugins/CheckerPlugins/CodeStyleChecker/CodeStyleCheckerDialog.py Tue Jun 09 20:10:59 2020 +0200 @@ -248,9 +248,12 @@ fixable = False itm = QTreeWidgetItem( - self.__lastFileItem, - ["{0:6}".format(result["line"]), result["code"], - result["display"]]) + self.__lastFileItem, [ + "{0:6}".format(result["line"]), + result["code"], + result["display"] + ] + ) if result["code"].startswith(("W", "-", "C", "M")): itm.setIcon(1, UI.PixmapCache.getIcon("warning")) elif result["code"].startswith(("A", "N")): @@ -293,7 +296,7 @@ itm.setData(0, self.positionRole, int(result["offset"])) itm.setData(0, self.messageRole, result["display"]) itm.setData(0, self.fixableRole, fixable) - itm.setData(0, self.codeRole, result["code"]) + itm.setData(0, self.codeRole, result["code"].split(".", 1)[0]) itm.setData(0, self.ignoredRole, result["ignored"]) itm.setData(0, self.argsRole, result["args"]) @@ -448,6 +451,8 @@ "MaximumComplexity": 3, } + # TODO: add 'SecurityChecker' + self.__initCategoriesList(self.__data["EnabledCheckerCategories"]) self.excludeFilesEdit.setText(self.__data["ExcludeFiles"]) self.excludeMessagesEdit.setText(self.__data["ExcludeMessages"]) @@ -596,7 +601,7 @@ self.maxAnnotationsComplexitySpinBox.value(), } - # TODO: implement safety arguments + # TODO: add 'SecurityChecker' safetyArgs = {} self.__options = [excludeMessages, includeMessages, repeatMessages, @@ -944,6 +949,8 @@ "MaximumComplexity": self.maxAnnotationsComplexitySpinBox.value(), } + + # TODO: add 'SecurityChecker' } if data != self.__data: self.__data = data @@ -1041,6 +1048,7 @@ vm.openSourceFile(fn, lineno=lineno, pos=position + 1) editor = vm.getOpenEditor(fn) + # TODO: add other syntax errors or do syntax check once for all if code in ["E901", "E902"]: editor.toggleSyntaxError(lineno, 0, True, message, True) else: @@ -1177,6 +1185,8 @@ Preferences.Prefs.settings.value( "PEP8/MaximumAnnotationComplexity", 3))) + # TODO: add 'SecurityChecker' + self.__cleanupData() @pyqtSlot() @@ -1243,6 +1253,8 @@ Preferences.Prefs.settings.setValue( "PEP8/MaximumAnnotationComplexity", self.maxAnnotationsComplexitySpinBox.value()) + + # TODO: add 'SecurityChecker' @pyqtSlot() def on_resetDefaultButton_clicked(self): @@ -1290,6 +1302,8 @@ Preferences.Prefs.settings.setValue( "PEP8/MaximumAnnotationComplexity", 3) + # TODO: add 'SecurityChecker' + # Update UI with default values self.on_loadDefaultButton_clicked()