diff mbox

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

Message ID 1475218835-7867-2-git-send-email-i.maximets@samsung.com
State Rejected
Headers show

Commit Message

Ilya Maximets Sept. 30, 2016, 7 a.m. UTC
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@samsung.com>
---
 CodingStyle.md | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

Comments

Mark Kavanagh Sept. 30, 2016, 8:49 a.m. UTC | #1
>
>People in OVS again and again tries to break log messages in parts.
>This breaks ability to find this lines in code while debugging.

<micro-nit> should be 'these lines', or 'this line' </micronit> 

Other than that, LGTM - thanks for making this explicit.

Acked-by: Mark Kavanagh <mark.b.kavanagh@intel.com>


>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@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
Ilya Maximets Sept. 30, 2016, 9:02 a.m. UTC | #2
On 30.09.2016 11:49, Kavanagh, Mark B wrote:
>>
>> People in OVS again and again tries to break log messages in parts.
>> This breaks ability to find this lines in code while debugging.
> 
> <micro-nit> should be 'these lines', or 'this line' </micronit>

Oh, I meant 'these lines'. Thanks for catching this typo.

I think, this issue doesn't deserve the new version and can be fixed
by maintainers while applying.

> 
> Other than that, LGTM - thanks for making this explicit.
> 
> Acked-by: Mark Kavanagh <mark.b.kavanagh@intel.com>
> 
> 
>> 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@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
> 
> 
> 
>
Mark Kavanagh Sept. 30, 2016, 9:16 a.m. UTC | #3
>
>On 30.09.2016 11:49, Kavanagh, Mark B wrote:
>>>
>>> People in OVS again and again tries to break log messages in parts.
>>> This breaks ability to find this lines in code while debugging.
>>
>> <micro-nit> should be 'these lines', or 'this line' </micronit>
>
>Oh, I meant 'these lines'. Thanks for catching this typo.
>
>I think, this issue doesn't deserve the new version and can be fixed
>by maintainers while applying.

+1 - thanks again, Mark.

>
>>
>> Other than that, LGTM - thanks for making this explicit.
>>
>> Acked-by: Mark Kavanagh <mark.b.kavanagh@intel.com>
>>
>>
>>> 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@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
>>
>>
>>
>>
Ben Pfaff Sept. 30, 2016, 2:41 p.m. UTC | #4
On Fri, Sep 30, 2016 at 10:00:34AM +0300, Ilya Maximets wrote:
> 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@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.

No thanks.  We regularly break strings across lines.  It's really not
hard to grep for them.
diff mbox

Patch

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.