--- a/eric6/Plugins/CheckerPlugins/CodeStyleChecker/CodeStyleCheckerDialog.py Sat Jun 06 19:42:15 2020 +0200 +++ b/eric6/Plugins/CheckerPlugins/CodeStyleChecker/CodeStyleCheckerDialog.py Sun Jun 07 20:19:54 2020 +0200 @@ -71,6 +71,9 @@ "N": QCoreApplication.translate( "CheckerCategories", "Naming"), + "S": QCoreApplication.translate( + "CheckerCategories", + "Security"), "W": QCoreApplication.translate( "CheckerCategories", "Warnings"), @@ -254,6 +257,18 @@ itm.setIcon(1, UI.PixmapCache.getIcon("namingError")) elif result["code"].startswith("D"): itm.setIcon(1, UI.PixmapCache.getIcon("docstringError")) + elif result["code"].startswith("S"): + if "severity" in result: + if result["severity"] == "H": + itm.setIcon(1, UI.PixmapCache.getIcon("securityLow")) + elif result["severity"] == "M": + itm.setIcon(1, UI.PixmapCache.getIcon("securityMedium")) + elif result["severity"] == "L": + itm.setIcon(1, UI.PixmapCache.getIcon("securityHigh")) + else: + itm.setIcon(1, UI.PixmapCache.getIcon("securityLow")) + else: + itm.setIcon(1, UI.PixmapCache.getIcon("securityLow")) else: itm.setIcon(1, UI.PixmapCache.getIcon("syntaxError")) if result["fixed"]: @@ -581,11 +596,14 @@ self.maxAnnotationsComplexitySpinBox.value(), } + # TODO: implement safety arguments + safetyArgs = {} + self.__options = [excludeMessages, includeMessages, repeatMessages, fixCodes, noFixCodes, fixIssues, maxLineLength, maxDocLineLength, blankLines, hangClosing, docType, codeComplexityArgs, miscellaneousArgs, - annotationArgs] + annotationArgs, safetyArgs] # now go through all the files self.progress = 0