Skip to content

Commit

Permalink
🎨 luacheck-update msg
Browse files Browse the repository at this point in the history
Signed-off-by: cyw3 <2927096163@qq.com>
  • Loading branch information
cyw3 committed Apr 18, 2024
1 parent 0a4e98d commit 6c0b6d7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions client/tool/luacheck.py
Original file line number Diff line number Diff line change
Expand Up @@ -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})
Expand Down

0 comments on commit 6c0b6d7

Please sign in to comment.