Open aaronfranke opened 4 years ago
I'd use a simple rule to break every line that's past a max line length (say 90 or 100) and add line breaks for that.
I'd just go from one line with all elements when it's not too long to having each value on one line where it's past the max length. In part for VCS, and in part so you can easily format it even by hand (select all commas in the blocks and insert a line break, or replace all spaces with a line break).
This brings me back to what I was mentioning before, it's the type of guideline I wouldn't want to have to follow by hand, but have a formatter handle it for us. It's something the computer is better at doing than humans.
Although it doesn't change the fact that we can think about and write guidelines about that.
The style guide currently contains many places where they have line breaks:
And many places where they don't:
I've been using the former when I was updating the demo projects earlier, but I noticed the latter when I was reviewing https://github.com/godotengine/godot-demo-projects/pull/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: