DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] doc/contributing: add line continuation note to meson guide
@ 2021-09-15  9:50 Bruce Richardson
  2021-09-15 15:04 ` David Marchand
  2021-09-16  7:57 ` Thomas Monjalon
  0 siblings, 2 replies; 6+ messages in thread
From: Bruce Richardson @ 2021-09-15  9:50 UTC (permalink / raw)
  To: dev; +Cc: david.marchand, Bruce Richardson

Add a note for the preference of using "()" rather than "\" for line
continuations in meson.

Suggested-by: David Marchand <david.marchand@redhat.com>
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
---
 doc/guides/contributing/coding_style.rst | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/doc/guides/contributing/coding_style.rst b/doc/guides/contributing/coding_style.rst
index d648689f10..b27b5fcfdb 100644
--- a/doc/guides/contributing/coding_style.rst
+++ b/doc/guides/contributing/coding_style.rst
@@ -1024,6 +1024,16 @@ The following guidelines apply to the build system code in meson.build files in
 * Line continuations should be doubly-indented to ensure visible difference from normal indentation.
   Any line continuations beyond the first may be singly indented to avoid large amounts of indentation.
 
+* Where a line is split in the middle of a statement, e.g. a multiline `if` statement,
+  brackets should be used in preference to escaping the line break.
+
+Example::
+
+    if (condition1 and condition2            # line breaks inside () need no escaping
+            and condition3 and condition4)
+        x = y
+    endif
+
 * Lists of files or components must be alphabetical unless doing so would cause errors.
 
 * Two formats are supported for lists of files or list of components:
-- 
2.30.2


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [dpdk-dev] [PATCH] doc/contributing: add line continuation note to meson guide
  2021-09-15  9:50 [dpdk-dev] [PATCH] doc/contributing: add line continuation note to meson guide Bruce Richardson
@ 2021-09-15 15:04 ` David Marchand
  2021-09-23 11:48   ` Thomas Monjalon
  2021-09-16  7:57 ` Thomas Monjalon
  1 sibling, 1 reply; 6+ messages in thread
From: David Marchand @ 2021-09-15 15:04 UTC (permalink / raw)
  To: Bruce Richardson; +Cc: dev, Thomas Monjalon, Yigit, Ferruh

On Wed, Sep 15, 2021 at 11:50 AM Bruce Richardson
<bruce.richardson@intel.com> wrote:
>
> Add a note for the preference of using "()" rather than "\" for line
> continuations in meson.
>
> Suggested-by: David Marchand <david.marchand@redhat.com>
> Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>

Reviewed-by: David Marchand <david.marchand@redhat.com>

Thanks Bruce.


-- 
David Marchand


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [dpdk-dev] [PATCH] doc/contributing: add line continuation note to meson guide
  2021-09-15  9:50 [dpdk-dev] [PATCH] doc/contributing: add line continuation note to meson guide Bruce Richardson
  2021-09-15 15:04 ` David Marchand
@ 2021-09-16  7:57 ` Thomas Monjalon
  2021-09-16  8:31   ` Bruce Richardson
  1 sibling, 1 reply; 6+ messages in thread
From: Thomas Monjalon @ 2021-09-16  7:57 UTC (permalink / raw)
  To: Bruce Richardson; +Cc: dev, david.marchand

15/09/2021 11:50, Bruce Richardson:
> Add a note for the preference of using "()" rather than "\" for line
> continuations in meson.
> 
> Suggested-by: David Marchand <david.marchand@redhat.com>
> Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
> ---
>  doc/guides/contributing/coding_style.rst | 10 ++++++++++

This is not the Meson guide.

> --- a/doc/guides/contributing/coding_style.rst
> +++ b/doc/guides/contributing/coding_style.rst
> @@ -1024,6 +1024,16 @@ The following guidelines apply to the build system code in meson.build files in
>  * Line continuations should be doubly-indented to ensure visible difference from normal indentation.
>    Any line continuations beyond the first may be singly indented to avoid large amounts of indentation.
>  
> +* Where a line is split in the middle of a statement, e.g. a multiline `if` statement,
> +  brackets should be used in preference to escaping the line break.

Should we specify it is about Meson?

> +
> +Example::
> +
> +    if (condition1 and condition2            # line breaks inside () need no escaping
> +            and condition3 and condition4)
> +        x = y
> +    endif
> +




^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [dpdk-dev] [PATCH] doc/contributing: add line continuation note to meson guide
  2021-09-16  7:57 ` Thomas Monjalon
@ 2021-09-16  8:31   ` Bruce Richardson
  2021-09-16  8:44     ` Thomas Monjalon
  0 siblings, 1 reply; 6+ messages in thread
From: Bruce Richardson @ 2021-09-16  8:31 UTC (permalink / raw)
  To: Thomas Monjalon; +Cc: dev, david.marchand

On Thu, Sep 16, 2021 at 09:57:30AM +0200, Thomas Monjalon wrote:
> 15/09/2021 11:50, Bruce Richardson:
> > Add a note for the preference of using "()" rather than "\" for line
> > continuations in meson.
> > 
> > Suggested-by: David Marchand <david.marchand@redhat.com>
> > Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
> > ---
> >  doc/guides/contributing/coding_style.rst | 10 ++++++++++
> 
> This is not the Meson guide.
> 
"coding style guide sub-section for meson" was too long to fit in the header.
 :-)

> > --- a/doc/guides/contributing/coding_style.rst
> > +++ b/doc/guides/contributing/coding_style.rst
> > @@ -1024,6 +1024,16 @@ The following guidelines apply to the build system code in meson.build files in
> >  * Line continuations should be doubly-indented to ensure visible difference from normal indentation.
> >    Any line continuations beyond the first may be singly indented to avoid large amounts of indentation.
> >  
> > +* Where a line is split in the middle of a statement, e.g. a multiline `if` statement,
> > +  brackets should be used in preference to escaping the line break.
> 
> Should we specify it is about Meson?
> 

It's in a section entitled "Meson Coding Style"[1] so that should not be
necessary.


[1]https://doc.dpdk.org/guides-21.08/contributing/coding_style.html#meson-coding-style

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [dpdk-dev] [PATCH] doc/contributing: add line continuation note to meson guide
  2021-09-16  8:31   ` Bruce Richardson
@ 2021-09-16  8:44     ` Thomas Monjalon
  0 siblings, 0 replies; 6+ messages in thread
From: Thomas Monjalon @ 2021-09-16  8:44 UTC (permalink / raw)
  To: Bruce Richardson; +Cc: dev, david.marchand

16/09/2021 10:31, Bruce Richardson:
> On Thu, Sep 16, 2021 at 09:57:30AM +0200, Thomas Monjalon wrote:
> > 15/09/2021 11:50, Bruce Richardson:
> > > Add a note for the preference of using "()" rather than "\" for line
> > > continuations in meson.
> > > 
> > > Suggested-by: David Marchand <david.marchand@redhat.com>
> > > Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
> > > ---
> > >  doc/guides/contributing/coding_style.rst | 10 ++++++++++
> > 
> > This is not the Meson guide.
> > 
> "coding style guide sub-section for meson" was too long to fit in the header.
>  :-)
> 
> > > --- a/doc/guides/contributing/coding_style.rst
> > > +++ b/doc/guides/contributing/coding_style.rst
> > > @@ -1024,6 +1024,16 @@ The following guidelines apply to the build system code in meson.build files in
> > >  * Line continuations should be doubly-indented to ensure visible difference from normal indentation.
> > >    Any line continuations beyond the first may be singly indented to avoid large amounts of indentation.
> > >  
> > > +* Where a line is split in the middle of a statement, e.g. a multiline `if` statement,
> > > +  brackets should be used in preference to escaping the line break.
> > 
> > Should we specify it is about Meson?
> > 
> 
> It's in a section entitled "Meson Coding Style"[1] so that should not be
> necessary.
> 
> 
> [1]https://doc.dpdk.org/guides-21.08/contributing/coding_style.html#meson-coding-style

OK I missed it. Sorry for the noise.



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [dpdk-dev] [PATCH] doc/contributing: add line continuation note to meson guide
  2021-09-15 15:04 ` David Marchand
@ 2021-09-23 11:48   ` Thomas Monjalon
  0 siblings, 0 replies; 6+ messages in thread
From: Thomas Monjalon @ 2021-09-23 11:48 UTC (permalink / raw)
  To: Bruce Richardson; +Cc: dev, Yigit, Ferruh, David Marchand

15/09/2021 17:04, David Marchand:
> On Wed, Sep 15, 2021 at 11:50 AM Bruce Richardson
> <bruce.richardson@intel.com> wrote:
> >
> > Add a note for the preference of using "()" rather than "\" for line
> > continuations in meson.
> >
> > Suggested-by: David Marchand <david.marchand@redhat.com>
> > Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
> 
> Reviewed-by: David Marchand <david.marchand@redhat.com>

Applied, thanks.




^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2021-09-23 11:48 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-15  9:50 [dpdk-dev] [PATCH] doc/contributing: add line continuation note to meson guide Bruce Richardson
2021-09-15 15:04 ` David Marchand
2021-09-23 11:48   ` Thomas Monjalon
2021-09-16  7:57 ` Thomas Monjalon
2021-09-16  8:31   ` Bruce Richardson
2021-09-16  8:44     ` Thomas Monjalon

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).