From 6050b01bf6ce1380594bf6e8789a56dfb20cfb4b Mon Sep 17 00:00:00 2001 From: Masaru Tsuchiyama Date: Thu, 27 Dec 2018 07:34:30 +0900 Subject: [PATCH 1/2] =?UTF-8?q?=E4=BA=88=E7=B4=84=E8=AA=9E=E3=81=AE=20type?= =?UTF-8?q?=20=E3=81=A8=E9=87=8D=E8=A4=87=E3=81=99=E3=82=8B=E5=A4=89?= =?UTF-8?q?=E6=95=B0=E5=90=8D=E3=82=92=E4=BD=BF=E3=82=8F=E3=81=AA=E3=81=84?= =?UTF-8?q?=E3=82=88=E3=81=86=E3=81=AB=E3=81=99=E3=82=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- parse-buildlog.py | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/parse-buildlog.py b/parse-buildlog.py index e8562cf903..c2e463c8af 100644 --- a/parse-buildlog.py +++ b/parse-buildlog.py @@ -8,7 +8,7 @@ # 解析結果を格納するハッシュのキー logHashKeys = [ - 'type', + 'errtype', 'code', 'source', 'dest', @@ -20,7 +20,7 @@ ] csvKeys = [ - 'type', + 'errtype', 'code', 'source', 'dest', @@ -31,7 +31,7 @@ ] excelKeys = [ - 'type', + 'errtype', 'code', 'source', 'dest', @@ -51,7 +51,7 @@ def parse_buildlog(infile): regLineNumer = r'\((?P\d+)\)' # エラーコードに対する正規表現: 例 warning C4267 - regError = r'\s*(?P\w+)\s+(?P\w+)\s*' + regError = r'\s*(?P\w+)\s+(?P\w+)\s*' # エラーメッセージ: 例 'argument': conversion from 'size_t' to 'int', possible loss of data [C:\projects\sakura\sakura\sakura.vcxproj] regMessage = r'(?P.+)$' @@ -80,12 +80,12 @@ def parse_buildlog(infile): if match: path = match.group('filePath') lineNumber = match.group('lineNumber') - type = match.group('type') + errtype = match.group('errtype') code = match.group('code') message = match.group('message') entry = {} - entry['type'] = type + entry['errtype'] = errtype entry['code'] = code match2 = re.search(regFromTo, text) @@ -191,19 +191,19 @@ def converterPython2(value): message = re.sub(r'((\S*)\)\s*)?\[(.+?)\]', r'', message) # エラータイプ - type = entry['type'] + errtype = entry['errtype'] # エラーコード code = entry['code'] # サマリーを管理するハッシュ用のキー - errorKey = ' '.join([type, code, message]) + errorKey = ' '.join([errtype, code, message]) if errorKey not in errorSummary: errorSummary[errorKey] = {} errorSummary[errorKey]["description"] = message errorSummary[errorKey]["entries"] = [] - errorSummary[errorKey]["type"] = type + errorSummary[errorKey]["errtype"] = errtype errorSummary[errorKey]["code"] = code errorSummary[errorKey]["entries"].append(entry) @@ -257,7 +257,7 @@ def converterPython2(value): message = errorSummary[errorKey]["description"] entries = errorSummary[errorKey]["entries"] - type = errorSummary[errorKey]["type"] + errtype = errorSummary[errorKey]["errtype"] code = errorSummary[errorKey]["code"] wsError = wb.create_sheet() From 60ba1bdd8608abab4cb2f060c3e4b33ffbe3112d Mon Sep 17 00:00:00 2001 From: Masaru Tsuchiyama Date: Sat, 29 Dec 2018 07:20:05 +0900 Subject: [PATCH 2/2] =?UTF-8?q?errtype=20=E2=86=92=20errType?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- parse-buildlog.py | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/parse-buildlog.py b/parse-buildlog.py index c2e463c8af..a50824e34a 100644 --- a/parse-buildlog.py +++ b/parse-buildlog.py @@ -8,7 +8,7 @@ # 解析結果を格納するハッシュのキー logHashKeys = [ - 'errtype', + 'errType', 'code', 'source', 'dest', @@ -20,7 +20,7 @@ ] csvKeys = [ - 'errtype', + 'errType', 'code', 'source', 'dest', @@ -31,7 +31,7 @@ ] excelKeys = [ - 'errtype', + 'errType', 'code', 'source', 'dest', @@ -51,7 +51,7 @@ def parse_buildlog(infile): regLineNumer = r'\((?P\d+)\)' # エラーコードに対する正規表現: 例 warning C4267 - regError = r'\s*(?P\w+)\s+(?P\w+)\s*' + regError = r'\s*(?P\w+)\s+(?P\w+)\s*' # エラーメッセージ: 例 'argument': conversion from 'size_t' to 'int', possible loss of data [C:\projects\sakura\sakura\sakura.vcxproj] regMessage = r'(?P.+)$' @@ -80,12 +80,12 @@ def parse_buildlog(infile): if match: path = match.group('filePath') lineNumber = match.group('lineNumber') - errtype = match.group('errtype') + errType = match.group('errType') code = match.group('code') message = match.group('message') entry = {} - entry['errtype'] = errtype + entry['errType'] = errType entry['code'] = code match2 = re.search(regFromTo, text) @@ -191,19 +191,19 @@ def converterPython2(value): message = re.sub(r'((\S*)\)\s*)?\[(.+?)\]', r'', message) # エラータイプ - errtype = entry['errtype'] + errType = entry['errType'] # エラーコード code = entry['code'] # サマリーを管理するハッシュ用のキー - errorKey = ' '.join([errtype, code, message]) + errorKey = ' '.join([errType, code, message]) if errorKey not in errorSummary: errorSummary[errorKey] = {} errorSummary[errorKey]["description"] = message errorSummary[errorKey]["entries"] = [] - errorSummary[errorKey]["errtype"] = errtype + errorSummary[errorKey]["errType"] = errType errorSummary[errorKey]["code"] = code errorSummary[errorKey]["entries"].append(entry) @@ -257,7 +257,7 @@ def converterPython2(value): message = errorSummary[errorKey]["description"] entries = errorSummary[errorKey]["entries"] - errtype = errorSummary[errorKey]["errtype"] + errType = errorSummary[errorKey]["errType"] code = errorSummary[errorKey]["code"] wsError = wb.create_sheet()