Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GDScript formatter removing spaces around "||" #601

Closed
ultsi opened this issue Feb 25, 2024 · 1 comment · Fixed by #605
Closed

GDScript formatter removing spaces around "||" #601

ultsi opened this issue Feb 25, 2024 · 1 comment · Fixed by #605
Assignees
Labels

Comments

@ultsi
Copy link

ultsi commented Feb 25, 2024

Godot version

4.3.dev3

VS Code version

1.86.1

Godot Tools VS Code extension version

2.0.0

System information

linux

Issue description

The code formatter removes spaces around the || operator in if clauses. It doesn't remove spaces around or.

Steps to reproduce

func test_if_or() -> void:
	var a := false
	var b := true
	if a || b:
		pass
	if a or b:
		pass

After autoformatting:

func test_if_or() -> void:
	var a := false
	var b := true
	if a||b:
		pass
	if a or b:
		pass
@ultsi ultsi added the bug label Feb 25, 2024
@DaelonSuzuka DaelonSuzuka self-assigned this Feb 25, 2024
@DaelonSuzuka
Copy link
Collaborator

Thanks for the report. I never use ||/&& because or/and are available, so I forgot them when I we were building the formatter tests.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants