Make formater remember indentation of commented lines
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Idoneità per principianti
- 48/100
Direzione di ricerca
Non sono indicati né un file sorgente né un test. Inizia riproducendo l'esempio numerato di GDScript e traccia il comportamento del formatter nei confronti delle righe commentate; il lavoro è completo quando la formattazione ne preserva l'indentazione, così che rimuovendo i commenti venga ripristinato un annidamento valido, e il comportamento richiesto sia coperto da un test di regressione.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Hello,
I often quickly multiline comment functions or part of the code when refactoring.
Unfortunately the formater remove the indentation, so when uncommenting, the function is not valid anymore
In my current workflow, I have to disable the formater for now :(
Would it be possible to add an option to avoid that ?
Note: I do know about """ for commenting but not a huge fan of them, and the formater move them to the end of the file
Thanks you
Steps to reproduce:
- Original Function:
func _input(event: InputEvent) -> void:
if event is InputEventMouseButton:
if event.pressed:
if event.button_index == MOUSE_BUTTON_RIGHT:
print('test')
- Adding multiline comments (CTRL+K)
#func _input(event: InputEvent) -> void:
#if event is InputEventMouseButton:
#if event.pressed:
#if event.button_index == MOUSE_BUTTON_RIGHT:
#print('test')
- Formating the file
#func _input(event: InputEvent) -> void:
#if event is InputEventMouseButton:
#if event.pressed:
#if event.button_index == MOUSE_BUTTON_RIGHT:
#print('test')
- Uncomenting the lines (CTRL+K)
func _input(event: InputEvent) -> void:
if event is InputEventMouseButton:
if event.pressed:
if event.button_index == MOUSE_BUTTON_RIGHT:
print('test')
- Lingua principale
- Rust
- Stelle
- 458
- Fork
- 40
- Merge medio
- 1g 15h
- PR unite (30g)
- 4
Guida per i contributori
Nessuna guida per i contributori indicizzata per questo repository
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di GDQuest/GDScript-formatter
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
GDQuest/GDScript-formatter#362 · 2 commenti ·
-
Godot 4.8.dev6 Parse Error Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
GDQuest/GDScript-formatter#359 · 9 commenti ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
GDQuest/GDScript-formatter#327 · 1 commento ·
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 65/100
GDQuest/GDScript-formatter#361 · 4 commenti ·
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 58/100
GDQuest/GDScript-formatter#360 ·
Tutte le issue di GDQuest/GDScript-formatter
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
-
bug core
Difficoltà 2/5 1-3 ore Idoneità per principianti 86/100
-
JIT-compiled number -> Decimal conversion silently overflows instead of raising DECIMAL_OVERFLOW Apertafuzz
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
ClickHouse/ClickHouse#122114 ·
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 92/100
linebender/vello_svg#90 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 74/100