GDQuest / GDQuest/GDScript-formatter

Add a way to ignore line length

Offen
#334 5 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
Vorherrschende Sprache
Rust
Sterne
455
Forks
39
Ø Merge
1 T. 15 Std.
Gemergte PRs (30 T.)
4

Beschreibung

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)?

Beitragsleitfaden

Für dieses Repository ist kein Beitragsleitfaden indexiert

Rechercherichtung

Start by tracing the max_line_length option through the Rust formatter and compare its handling of long function headers with multiline dictionaries. Use the examples in the issue to define the expected behavior, then verify that the new configuration path disables line-length forcing without inlining existing multiline structures.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
godot, rust
Bereich
tooling
Issue-Typ
Feature
Schwierigkeit
3/5
Geschätzter Aufwand
1-2 Tage
Aktivitätsstatus
Aktiv
Klarheit
Größtenteils klar
Anfängerfreundlichkeit
68/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.