doc: clarify spaces for alignment note

Message ID 20190311183939.21166-1-ktraynor@redhat.com (mailing list archive)
State Rejected, archived
Delegated to: Thomas Monjalon
Headers
Series doc: clarify spaces for alignment note |

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/Intel-compilation success Compilation OK

Commit Message

Kevin Traynor March 11, 2019, 6:39 p.m. UTC
  Make clear that spaces are only for alignments less than tab size.

Signed-off-by: Kevin Traynor <ktraynor@redhat.com>
---
 doc/guides/contributing/coding_style.rst | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
  

Comments

Rami Rosen March 11, 2019, 11:08 p.m. UTC | #1
> Make clear that spaces are only for alignments less than tab size.
>
> Signed-off-by: Kevin Traynor <ktraynor@redhat.com>
>

Acked-by: Rami Rosen <ramirose@gmail.com>
  
Kovacevic, Marko March 25, 2019, 11:36 a.m. UTC | #2
> Subject: [dpdk-dev] [PATCH] doc: clarify spaces for alignment note
> 
> Make clear that spaces are only for alignments less than tab size.
> 
> Signed-off-by: Kevin Traynor <ktraynor@redhat.com>
> ---
>  doc/guides/contributing/coding_style.rst | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/doc/guides/contributing/coding_style.rst
> b/doc/guides/contributing/coding_style.rst
> index d96698a73..dd7ddc21e 100644
> --- a/doc/guides/contributing/coding_style.rst
> +++ b/doc/guides/contributing/coding_style.rst
> @@ -348,5 +348,5 @@ General
>  .. note::
> 
> -	Global whitespace rule in DPDK, use tabs for indentation, spaces for
> alignment.
> +	Global whitespace rule in DPDK, use tabs for indentation, spaces for
> smaller alignments.
> 
>  * Do not put any spaces before a tab for indentation.

Acked-by: Marko Kovacevic <marko.kovacevic@intel.com>
  
Thomas Monjalon May 24, 2020, 10:47 p.m. UTC | #3
11/03/2019 19:39, Kevin Traynor:
> Make clear that spaces are only for alignments less than tab size.
> 
> Signed-off-by: Kevin Traynor <ktraynor@redhat.com>
> ---
> --- a/doc/guides/contributing/coding_style.rst
> +++ b/doc/guides/contributing/coding_style.rst
> -	Global whitespace rule in DPDK, use tabs for indentation, spaces for alignment.
> +	Global whitespace rule in DPDK, use tabs for indentation, spaces for smaller alignments.

tab Vs spaces :D

I am not sure what is the most followed convention in DPDK.
I thought most of alignments were done with spaces only.
I mean spaces before an end-of-line comment:

struct foo {
	int an_interesting_field;  /* mandatory */
	char poor_field;           /* optional thing */
}
  
John McNamara May 25, 2020, 9:54 a.m. UTC | #4
> -----Original Message-----
> From: Thomas Monjalon <thomas@monjalon.net>
> Sent: Sunday, May 24, 2020 11:47 PM
> To: Kevin Traynor <ktraynor@redhat.com>
> Cc: Mcnamara, John <john.mcnamara@intel.com>; Yigit, Ferruh
> <ferruh.yigit@intel.com>; dev@dpdk.org
> Subject: Re: [dpdk-dev] [PATCH] doc: clarify spaces for alignment note
> 
> 11/03/2019 19:39, Kevin Traynor:
> > Make clear that spaces are only for alignments less than tab size.
> >
> > Signed-off-by: Kevin Traynor <ktraynor@redhat.com>
> > ---
> > --- a/doc/guides/contributing/coding_style.rst
> > +++ b/doc/guides/contributing/coding_style.rst
> > -	Global whitespace rule in DPDK, use tabs for indentation, spaces for
> alignment.
> > +	Global whitespace rule in DPDK, use tabs for indentation, spaces for
> smaller alignments.
> 
> tab Vs spaces 😃

The forever-war!

> 
> I am not sure what is the most followed convention in DPDK.
> I thought most of alignments were done with spaces only.

That was my understanding too: tabs for indentation, spaces for alignment. 

John
  
Stephen Hemminger June 12, 2023, 3:59 p.m. UTC | #5
On Mon, 11 Mar 2019 18:39:39 +0000
Kevin Traynor <ktraynor@redhat.com> wrote:

> Make clear that spaces are only for alignments less than tab size.
> 
> Signed-off-by: Kevin Traynor <ktraynor@redhat.com>
> ---
>  doc/guides/contributing/coding_style.rst | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/doc/guides/contributing/coding_style.rst b/doc/guides/contributing/coding_style.rst
> index d96698a73..dd7ddc21e 100644
> --- a/doc/guides/contributing/coding_style.rst
> +++ b/doc/guides/contributing/coding_style.rst
> @@ -348,5 +348,5 @@ General
>  .. note::
>  
> -	Global whitespace rule in DPDK, use tabs for indentation, spaces for alignment.
> +	Global whitespace rule in DPDK, use tabs for indentation, spaces for smaller alignments.
>  
>  * Do not put any spaces before a tab for indentation.

Dropping this patch, the wording makes sense but the responses bordered on bike shedding
about white space.

IMHO we should get some automated tools involved (like clang format) to handle whitespace
inconsistency.
  

Patch

diff --git a/doc/guides/contributing/coding_style.rst b/doc/guides/contributing/coding_style.rst
index d96698a73..dd7ddc21e 100644
--- a/doc/guides/contributing/coding_style.rst
+++ b/doc/guides/contributing/coding_style.rst
@@ -348,5 +348,5 @@  General
 .. note::
 
-	Global whitespace rule in DPDK, use tabs for indentation, spaces for alignment.
+	Global whitespace rule in DPDK, use tabs for indentation, spaces for smaller alignments.
 
 * Do not put any spaces before a tab for indentation.