[Build] Strip log lines before match test
authorWonyoung Choi <wy80.choi@samsung.com>
Mon, 24 Dec 2018 05:19:36 +0000 (14:19 +0900)
committerWonyoung Choi <wy80.choi@samsung.com>
Mon, 24 Dec 2018 05:19:36 +0000 (14:19 +0900)
tools/scripts/CodeChecker/BuildLog.py

index 26a79b4..8960f34 100644 (file)
@@ -10,7 +10,7 @@ class BuildLog:
   def _parseLog(self):
     errorPattern = re.compile('[0-9]+>(.+)\(([0-9]+),[0-9]+\): (error|warning) ([A-Z0-9]+): (.+) \[/')
     for line in self._file.readlines():
-      m = errorPattern.match(line)
+      m = errorPattern.match(line.strip())
       if m is not None:
         item = {'file': m.group(1), 'line': int(m.group(2)), 'type': m.group(3), 'code': m.group(4), 'message': m.group(5)}
         if item['type'] == 'warning':