doc: clarify spaces for alignment note
Checks
Commit Message
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
> 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>
> 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>
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 */
}
> -----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
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.
@@ -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.