Open
Description
The style guide currently contains many places where they have line breaks:
var party = [
"Godot",
"Godette",
"Steve",
]
var character_dir = {
"Name": "Bob",
"Age": 27,
"Job": "Mechanic",
}
enum Tiles {
TILE_BRICK,
TILE_FLOOR,
TILE_SPIKE,
TILE_TELEPORT,
}
enum Element {
EARTH,
WATER,
AIR,
FIRE,
}
And many places where they don't:
my_array = [4, 5, 6]
enum Tiles {TILE_BRICK, TILE_FLOOR, TILE_SPIKE, TILE_TELEPORT}
enum Jobs {KNIGHT, WIZARD, ROGUE, HEALER, SHAMAN}
I've been using the former when I was updating the demo projects earlier, but I noticed the latter when I was reviewing godotengine/godot-demo-projects#405.
I think a style should be chosen for each of arrays/dictionaries/enums, or a guideline should be created for when to use which style (number of items? length of items? total enum length?) and if other styles are ever acceptable, like would this ever be allowed:
enum Tiles {
TILE_BRICK, TILE_FLOOR,
TILE_SPIKE, TILE_TELEPORT,
}