GDQuest / GDQuest/GDScript-formatter

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

オープン
#347 コメント 3 件 リアクション 0 件 担当者 0 名 GitHub で見る
主要言語
Rust
スター
455
フォーク
39
平均マージ
1日 15時間
マージ済み PR(30日)
4

説明

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.

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

調査の方向性

issue にある 2 つのアノテーションスニペットを使って formatter の出力を再現し、次にアノテーションを並べ替える formatter のエントリポイントを追跡します。1 行の export と 2 行の export が混在するケースをカバーする回帰ケースを追加し、フォーマットによって元の順序が維持され、報告されている複数行レイアウトも保たれることを確認します。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
rust
領域
tooling
issue の種類
バグ
難易度
3/5
見積もり時間
1〜2日
活発さ
活発
明瞭さ
おおむね明確
初心者へのやさしさ
68/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。