Browse Source

Merge pull request #2994 from Calinou/add-gdscript-line-length-guideline

Add a line length guideline to the GDScript style guide
Nathan Lovato 5 years ago
parent
commit
373f662571
1 changed files with 7 additions and 0 deletions
  1. 7 0
      getting_started/scripting/gdscript/gdscript_styleguide.rst

+ 7 - 0
getting_started/scripting/gdscript/gdscript_styleguide.rst

@@ -86,6 +86,13 @@ Surround functions and class definitions with two blank lines:
 
 
 Use one blank line inside functions to separate logical sections.
 Use one blank line inside functions to separate logical sections.
 
 
+Line length
+~~~~~~~~~~~
+
+Try to keep lines under 80 characters. This ensures greater readability on small
+displays and splitted editors (such as side-by-side diffs). It's OK to go over
+by a few characters, but a line should never exceed 100 characters.
+
 One statement per line
 One statement per line
 ~~~~~~~~~~~~~~~~~~~~~~
 ~~~~~~~~~~~~~~~~~~~~~~