Description:
The --reorder-code flag reorders @tool after class_name, which breaks the script's syntax. In GDScript, @tool must appear before class_name and extends.
Input:
@tool
extends RefCounted
class_name Test
func _init() -> void:
pass
Command:
gdscript-formatter --reorder-code
Output:
class_name Test
@tool
extends RefCounted
func _init() -> void:
pass
Expected:
The @tool annotation should remain at the top, before class_name and extends.
Description:
The
--reorder-codeflag reorders@toolafterclass_name, which breaks the script's syntax. In GDScript,@toolmust appear beforeclass_nameandextends.Input:
Command:
Output:
Expected:
The
@toolannotation should remain at the top, beforeclass_nameandextends.