252 itm.setIcon(1, UI.PixmapCache.getIcon("warning")) |
255 itm.setIcon(1, UI.PixmapCache.getIcon("warning")) |
253 elif result["code"].startswith(("A", "N")): |
256 elif result["code"].startswith(("A", "N")): |
254 itm.setIcon(1, UI.PixmapCache.getIcon("namingError")) |
257 itm.setIcon(1, UI.PixmapCache.getIcon("namingError")) |
255 elif result["code"].startswith("D"): |
258 elif result["code"].startswith("D"): |
256 itm.setIcon(1, UI.PixmapCache.getIcon("docstringError")) |
259 itm.setIcon(1, UI.PixmapCache.getIcon("docstringError")) |
|
260 elif result["code"].startswith("S"): |
|
261 if "severity" in result: |
|
262 if result["severity"] == "H": |
|
263 itm.setIcon(1, UI.PixmapCache.getIcon("securityLow")) |
|
264 elif result["severity"] == "M": |
|
265 itm.setIcon(1, UI.PixmapCache.getIcon("securityMedium")) |
|
266 elif result["severity"] == "L": |
|
267 itm.setIcon(1, UI.PixmapCache.getIcon("securityHigh")) |
|
268 else: |
|
269 itm.setIcon(1, UI.PixmapCache.getIcon("securityLow")) |
|
270 else: |
|
271 itm.setIcon(1, UI.PixmapCache.getIcon("securityLow")) |
257 else: |
272 else: |
258 itm.setIcon(1, UI.PixmapCache.getIcon("syntaxError")) |
273 itm.setIcon(1, UI.PixmapCache.getIcon("syntaxError")) |
259 if result["fixed"]: |
274 if result["fixed"]: |
260 itm.setIcon(0, UI.PixmapCache.getIcon("issueFixed")) |
275 itm.setIcon(0, UI.PixmapCache.getIcon("issueFixed")) |
261 elif ( |
276 elif ( |
579 self.minAnnotationsCoverageSpinBox.value(), |
594 self.minAnnotationsCoverageSpinBox.value(), |
580 "MaximumComplexity": |
595 "MaximumComplexity": |
581 self.maxAnnotationsComplexitySpinBox.value(), |
596 self.maxAnnotationsComplexitySpinBox.value(), |
582 } |
597 } |
583 |
598 |
|
599 # TODO: implement safety arguments |
|
600 safetyArgs = {} |
|
601 |
584 self.__options = [excludeMessages, includeMessages, repeatMessages, |
602 self.__options = [excludeMessages, includeMessages, repeatMessages, |
585 fixCodes, noFixCodes, fixIssues, maxLineLength, |
603 fixCodes, noFixCodes, fixIssues, maxLineLength, |
586 maxDocLineLength, blankLines, hangClosing, |
604 maxDocLineLength, blankLines, hangClosing, |
587 docType, codeComplexityArgs, miscellaneousArgs, |
605 docType, codeComplexityArgs, miscellaneousArgs, |
588 annotationArgs] |
606 annotationArgs, safetyArgs] |
589 |
607 |
590 # now go through all the files |
608 # now go through all the files |
591 self.progress = 0 |
609 self.progress = 0 |
592 self.files.sort() |
610 self.files.sort() |
593 if len(self.files) == 1: |
611 if len(self.files) == 1: |