GDQuest / GDQuest/GDScript-formatter
Formatter on/off comments within a code block can prevent the entire code block from wrapping
- Vorherrschende Sprache
- Rust
- Sterne
- 455
- Forks
- 39
- Ø Merge
- 1 T. 15 Std.
- Gemergte PRs (30 T.)
- 4
Beschreibung
## Sample code
```gd
func add_river_quad(v1: Vector3, v2: Vector3, v3: Vector3, v4: Vector3, y: float, v: float, reversed: bool) -> void:
add_river_quad_two_heights(v1, v2, v3, v4, y, y, v, reversed)
func add_river_quad_two_heights(v1: Vector3, v2: Vector3, v3: Vector3, v4: Vector3, y1: float, y2: float, v: float, reversed: bool) -> void:
pass
```
## With line_width = 80
```gd
# Ok
func add_river_quad(
v1: Vector3,
v2: Vector3,
v3: Vector3,
v4: Vector3,
y: float,
v: float,
reversed: bool,
) -> void:
add_river_quad_two_heights(v1, v2, v3, v4, y, y, v, reversed)
# Not ok
func add_river_quad_two_heights(v1: Vector3, v2: Vector3, v3: Vector3, v4: Vector3, y1: float, y2: float, v: float, reversed: bool) -> void:
pass
```
## With line_width = 120
```gd
# Is OK
func add_river_quad(v1: Vector3, v2: Vector3, v3: Vector3, v4: Vector3, y: float, v: float, reversed: bool) -> void:
add_river_quad_two_heights(v1, v2, v3, v4, y, y, v, reversed)
# Still not split into multiple lines
func add_river_quad_two_heights(v1: Vector3, v2: Vector3, v3: Vector3, v4: Vector3, y1: float, y2: float, v: float, reversed: bool) -> void:
```
Given the warning `max-line-length:warning: Line is too long. Found 166 characters, maximum allowed is 120`
Beitragsleitfaden
Für dieses Repository ist kein Beitragsleitfaden indexiert
Bewertung
Dieses Issue wurde noch nicht bewertet.