[ovs-dev] [PATCH 1/2] CodingStyle.md: Clarify limit for line length.

Ilya Maximets i.maximets at samsung.com
Fri Sep 30 07:00:34 UTC 2016


People in OVS again and again tries to break log messages in parts.
This breaks ability to find this lines in code while debugging.
It's required to document this thing directly in CodingStyle.md to
avoid such situations in the future.

Text actually ported from the Linux kernel coding style.

Signed-off-by: Ilya Maximets <i.maximets at samsung.com>
---
 CodingStyle.md | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/CodingStyle.md b/CodingStyle.md
index 0a441e0..a27ff31 100644
--- a/CodingStyle.md
+++ b/CodingStyle.md
@@ -16,7 +16,11 @@ The following GNU indent options approximate this style:
 
 ## BASICS
 
-  Limit lines to 79 characters.
+  Limit lines to 79 characters.  Statements longer than 79 characters should
+be broken into sensible chunks, unless exceeding 79 characters significantly
+increases readability and does not hide information. However, never break
+user-visible strings such as VLOG messages, because that breaks the ability to
+grep for them.
 
   Use form feeds (control+L) to divide long source files into logical
 pieces.  A form feed should appear as the only character on a line.
-- 
2.7.4




More information about the dev mailing list