Plugins/CheckerPlugins/CodeStyleChecker/CodeStyleChecker.py

changeset 3022
57179e4cdadd
parent 2983
f2f33024b001
child 3036
30c81c9e88b8
child 3058
0a02c433f52d
equal deleted inserted replaced
3021:801289962f4e 3022:57179e4cdadd
49 self.errors = [] 49 self.errors = []
50 self.counters = {} 50 self.counters = {}
51 51
52 interpreter = Preferences.getDebugger("PythonInterpreter") 52 interpreter = Preferences.getDebugger("PythonInterpreter")
53 if interpreter == "" or not Utilities.isExecutable(interpreter): 53 if interpreter == "" or not Utilities.isExecutable(interpreter):
54 self.errors.append((filename, 1, 1, 54 self.errors.append(
55 QCoreApplication.translate("CodeStyleCheckerPy2", 55 (filename, 1, 1,
56 QCoreApplication.translate(
57 "CodeStyleCheckerPy2",
56 "Python2 interpreter not configured."))) 58 "Python2 interpreter not configured.")))
57 return 59 return
58 60
59 checker = os.path.join(getConfig('ericDir'), 61 checker = os.path.join(getConfig('ericDir'),
60 "UtilitiesPython2", "CodeStyleChecker.py") 62 "UtilitiesPython2", "CodeStyleChecker.py")
121 while index < len(output): 123 while index < len(output):
122 code, countStr = output[index].split(None, 1) 124 code, countStr = output[index].split(None, 1)
123 self.counters[code] = int(countStr) 125 self.counters[code] = int(countStr)
124 index += 1 126 index += 1
125 else: 127 else:
126 self.errors.append((filename, 1, 1, 128 self.errors.append(
127 QCoreApplication.translate("CodeStyleCheckerPy2", 129 (filename, 1, 1,
130 QCoreApplication.translate(
131 "CodeStyleCheckerPy2",
128 "Python2 interpreter did not finish within 15s."))) 132 "Python2 interpreter did not finish within 15s.")))

eric ide

mercurial