Skip to content

Commit

Permalink
Merge pull request Tencent#1062 from cyw3/main
Browse files Browse the repository at this point in the history
luacheck: update msg
  • Loading branch information
yql70 authored Apr 18, 2024
2 parents 0471bc5 + d651839 commit a0217ba
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions client/tool/luacheck.py
Original file line number Diff line number Diff line change
Expand Up @@ -140,11 +140,11 @@ def run_luacheck(self, scan_cmd, error_output, pos, rules):
message = error.attrib.get("message")
if message is None:
continue
msg = message.split(":", 3)[3]
infos = message.split(":", 3)
# msg中 on line 后面也会跟着行号
msg = msg.split("on line ")[0].strip()
line = int(message.split(":")[1])
column = int(message.split(":")[2])
msg = infos[3].split("on line ")[0].strip()
line = int(infos[1])
column = int(infos[2])
issues.append({"path": path, "rule": rule, "msg": msg, "line": line, "column": column})
return issues

Expand Down

0 comments on commit a0217ba

Please sign in to comment.