GDQuest / GDQuest/GDScript-formatter

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

Aperta
#347 3 commenti 0 reazioni 0 assegnatari Vedi su GitHub
Lingua principale
Rust
Stelle
455
Fork
39
Merge medio
1g 15h
PR unite (30g)
4

Descrizione

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.

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Direzione di ricerca

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.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
rust
Ambito
tooling
Tipo di issue
Bug
Difficoltà
3/5
Tempo stimato
1-2 giorni
Stato di attività
Attiva
Chiarezza
Abbastanza chiara
Idoneità per principianti
68/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.