From 6c0b6d7a9f9ece283b288d09f22f4bbed2263c36 Mon Sep 17 00:00:00 2001 From: cyw3 <2927096163@qq.com> Date: Thu, 18 Apr 2024 13:14:22 +0800 Subject: [PATCH] :art: luacheck-update msg Signed-off-by: cyw3 <2927096163@qq.com> --- client/tool/luacheck.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/client/tool/luacheck.py b/client/tool/luacheck.py index f31c0acda0..e62b8cb103 100644 --- a/client/tool/luacheck.py +++ b/client/tool/luacheck.py @@ -140,9 +140,9 @@ def run_luacheck(self, scan_cmd, error_output, pos, rules): message = error.attrib.get("message") if message is None: continue - msg = message.split(":")[3] + msg = message.split(":", 3)[3] # msg中 on line 后面也会跟着行号 - msg = msg.split("on line ")[0] + msg = msg.split("on line ")[0].strip() line = int(message.split(":")[1]) column = int(message.split(":")[2]) issues.append({"path": path, "rule": rule, "msg": msg, "line": line, "column": column})