Open axel37 opened 3 months ago
After a little digging, it looks to be a display issue, the underlying data seems to be parsed correctly.
(I only spent 15 minutes on this, so you might not want to take my word for it :stuck_out_tongue_closed_eyes: )
In Dock.gd
, at create_item()
, the line number is still correct :
func create_item(line: int, name: String) -> void:
#>> Start ninja debugging <<#
print("GDLint : got error at line :")
print(line)
#>> End ninja debugging <<#
var regex = RegEx.new()
regex.compile("(?<=\\()[^\\)]+")
var result := regex.search_all(name)
var error_type := result[-1].strings[0]
if _ignore.get(str_dash_to_underscore(error_type)):
num_ignored_problems += 1
return
var item := tree.create_item()
item.set_text(0, str(line))
item.set_text(1, name)
item.set_metadata(0, line)
if error_descriptions.error.has(error_type):
item.set_tooltip_text(1, error_descriptions.error[error_type])
num_problems += 1
Outputs :
GDLint : got error at line :
131
Thank you for the bug report, that's interesting that Godot doesn't respect the minimum size I set the column to.
Hi !
I've just installed the project and stumbled upon an issue : it seems that, in long files, the line number is shown incorrectly.
In-engine screenshot :
Manually running
gdlint
in terminal :As we can see,
gdlint
reports the correct line number (131), while the plugin truncates it to the first 2 characters (13).Godot :
v4.2.2.stable.official [15073afe3]
GDLint Plugin :2.0.2
, installed in-engine through AssetLib gdlint :4.2.2
, installed withpip3
Thanks for the plugin ! :tada: