133 fixable = False |
133 fixable = False |
134 code, message = message.split(None, 1) |
134 code, message = message.split(None, 1) |
135 itm = QTreeWidgetItem( |
135 itm = QTreeWidgetItem( |
136 self.__lastFileItem, |
136 self.__lastFileItem, |
137 ["{0:6}".format(line), code, message]) |
137 ["{0:6}".format(line), code, message]) |
138 if code.startswith("W"): |
138 if code.startswith(("W", "-")): |
139 itm.setIcon(1, UI.PixmapCache.getIcon("warning.png")) |
139 itm.setIcon(1, UI.PixmapCache.getIcon("warning.png")) |
140 elif code.startswith("N"): |
140 elif code.startswith("N"): |
141 itm.setIcon(1, UI.PixmapCache.getIcon("namingError.png")) |
141 itm.setIcon(1, UI.PixmapCache.getIcon("namingError.png")) |
142 elif code.startswith("D"): |
142 elif code.startswith("D"): |
143 itm.setIcon(1, UI.PixmapCache.getIcon("docstringError.png")) |
143 itm.setIcon(1, UI.PixmapCache.getIcon("docstringError.png")) |
368 def check(self, codestring='', onlyFixes={}): |
368 def check(self, codestring='', onlyFixes={}): |
369 """ |
369 """ |
370 Start a style check for one file. |
370 Start a style check for one file. |
371 |
371 |
372 The results are reported to the __processResult slot. |
372 The results are reported to the __processResult slot. |
|
373 |
373 @keyparam codestring optional sourcestring (str) |
374 @keyparam codestring optional sourcestring (str) |
374 @keyparam onlyFixes dict which violations should be fixed (dict) |
375 @keyparam onlyFixes dict which violations should be fixed (dict) |
375 """ |
376 """ |
376 if not self.files: |
377 if not self.files: |
377 self.checkProgressLabel.setPath("") |
378 self.checkProgressLabel.setPath("") |