GDQuest / GDQuest/GDScript-formatter

Add a way to ignore line length

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

説明

First of all, thank you for this formatter !

We are currently studying the possibility of adding it to our project.

After a few tries with different parameters on the codebase, we came to the conclusion that it was better to disable line size forcing, because it would produce less readable code for some cases (for example, some function headers that would be spread over 5 lines instead of one because it was just a bit longer than the max line length).

In order to turn off the line length forcing, we set max_line_length to an absurd amount (1000). But it produced other unintended scenarios, for example a dictionary that was declared on several lines (one line per entry) was now inlined by the formatter.

Is there a way to tell to the formatter to not take care of the line length ? If not, would it be possible to add this as an option (as an additional parameter or by unsetting max_line_length or setting it to 0, for example)?

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

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

調査の方向性

まず、Rust formatter 内で max_line_length オプションがどのように渡されるかを追跡し、長い関数ヘッダーと複数行の辞書での処理を比較してください。issue の例を使って期待される動作を定義し、新しい設定パスによって行長の強制が無効になり、既存の複数行構造がインライン化されないことを確認してください。

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

評価

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

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

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