File tree Expand file tree Collapse file tree 1 file changed +11
-10
lines changed
addons/GDQuest_GDScript_formatter Expand file tree Collapse file tree 1 file changed +11
-10
lines changed Original file line number Diff line number Diff line change @@ -582,16 +582,17 @@ func lint_code(script: GDScript) -> Array:
582582## Parses a lint issue line and returns a dictionary with issue information
583583func parse_lint_issue (line : String ) -> Dictionary :
584584 # Expected format: filename:line:rule:severity: message
585- var parts = line .split (":" , 4 )
586- if parts .size () < 5 :
587- return { }
588-
589- return {
590- "line" : int (parts [1 ]) - 1 , # Convert to 0-based indexing
591- "rule" : parts [2 ],
592- "severity" : parts [3 ],
593- "message" : parts [4 ].strip_edges (),
594- }
585+ var regex = RegEx .new ()
586+ regex .compile (r "^(.*\. gd):(\d +):([^:]+):([^:]+):([\s\S ]*)$" )
587+ var result = regex .search (line )
588+ if result :
589+ return {
590+ "line" : int (result .get_string (2 )) - 1 ,
591+ "rule" : result .get_string (3 ),
592+ "severity" : result .get_string (4 ),
593+ "message" : result .get_string (5 ).strip_edges (),
594+ }
595+ return { }
595596
596597
597598## Applies lint highlighting to the code editor
You can’t perform that action at this time.
0 commit comments