GDQuest / GDQuest/GDScript-formatter

Two-lined export annotation are always placed after one-lined annotations

Open
#347 3 comments 0 reactions 0 assignees View on GitHub
Dominant language
Rust
Stars
455
Forks
39
Avg merge
1d 15h
Merged PRs (30d)
4

Description

Given :

```gd
@export
var test_first: int

@export var test_second: int
```

It will be reformated as :

```gd
@export var test_second: int

@export
var test_first: int
```

Is this intended behaviour ?

For some cases when we have some setter/ long annotation we prefer to have this formatting :

```gd
@export_range(1, 30, 1, "prefer_slider")
var min_tiles: int = 3:
set = _set_min_tiles
```

I don't think the order of export should be modified by the formater.

Contributor guide

No contributing guide indexed for this repository

Research direction

Reproduce the formatter output using the two annotation snippets in the issue, then trace the formatter entry point that orders annotations. Add a regression case covering mixed one-line and two-line exports, and verify that formatting preserves their original order while keeping the reported multiline layout.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
68/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.