Skip to content

Bug with extends when class name is less than 3 characters #82

@brady444

Description

@brady444

(tested on gdscript-formatter 0.9.1)

There seems to be a bug when using extends when the class name is 1 or 2 characters long:

Input:

class_name UI extends Control

enum Screen {
	MAIN_MENU,
	LOBBY,
	GAME,
}

Output:

class_name UI extendsControl enum Screen {
	MAIN_MENU,
	LOBBY,
	GAME,
}

This doesn't happen with longer class names:

Input:

class_name UserInterface extends Control

enum Screen {
	MAIN_MENU,
	LOBBY,
	GAME,
}

Output (same as input):

class_name UserInterface extends Control

enum Screen {
	MAIN_MENU,
	LOBBY,
	GAME,
}

It doesn't happen without extends either:

Input:

class_name UI

enum Screen {
	MAIN_MENU,
	LOBBY,
	GAME,
}

Output (same as input):

class_name UI

enum Screen {
	MAIN_MENU,
	LOBBY,
	GAME,
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    upstreamThe issue (likely) can't be solved in this repository: a library needs a change

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions