Add hard limit for line length
authorRoland Schulz <roland.schulz@intel.com>
Fri, 24 Aug 2018 04:20:08 +0000 (21:20 -0700)
committerMark Abraham <mark.j.abraham@gmail.com>
Tue, 28 Aug 2018 14:08:13 +0000 (16:08 +0200)
Extremely long lines are a pain in diff-views (gerrit, github, ...),
and a problem for readability. The specific number doesn't matter,
as long as it reasonable. Most of us are just ignoring 80 so that
is useless as guideline.

Change-Id: I5dbced451b56bc307beea2aec7599b8764f978cd

docs/dev-manual/formatting.rst

index e8f0659232d9f270d8775c9bfd81c8d9b1fb2a42..15efc0562e0befa7d3d3311bee39b08c9cadf63d 100644 (file)
@@ -7,9 +7,9 @@ The following list provides the general formatting/indentation rules for
 |Gromacs| code (C/C++):
 
 * Basic indentation is four spaces.
-* Keep lines at a reasonable length.  There is no hard limit, but use 80
-  characters as a guideline.  If you end up indenting very deeply,
-  consider splitting the code into functions.
+* Keep lines at a reasonable length. Keep every line at least below 120
+  characters.  If you end up indenting very deeply, consider splitting the code
+  into functions.
 * Do not use tabs, only spaces.  Most editors can be configured to generate
   spaces even when pressing tab.  Tabs (in particular when mixed with spaces)
   easily break indentation in contexts where settings are not exactly equal