GDQuest / GDQuest/GDScript-formatter

Add a way to ignore line length

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

Descrizione

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

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Direzione di ricerca

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.

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

Valutazione

Stack tecnologico
godot, rust
Ambito
tooling
Tipo di issue
Funzionalità
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.