doc/contributing: add line continuation note to meson guide
PATCH 1/1 doc/contributing: add line continuation note to meson guide
Add a note for the preference of using "()" rather than "\" for line continuations in meson.
--- doc/guides/contributing/coding_style.rst | 10 ++++++++++ 1 file changed, 10 insertions(+)
doc/guides/contributing/coding_style.rst +10 -0
@@ -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:
Signature · 1 line
2.30.2
Quoted 6 lines · Bruce Richardson
Add a note for the preference of using "()" rather than "\" for line continuations in meson.
Suggested-by David Marchand <[email protected]>Signed-off-by Bruce Richardson <[email protected]>
Thanks Bruce.
Signature · 1 line
David Marchand
Thomas Monjalon
Applied15/09/2021 17:04, David Marchand:
Quoted 10 lines
Quoted 6 lines · Bruce Richardson
Add a note for the preference of using "()" rather than "\" for line continuations in meson.
Suggested-by David Marchand <[email protected]>Signed-off-by Bruce Richardson <[email protected]>Reviewed-by David Marchand <[email protected]>
Applied, thanks.
15/09/2021 11:50, Bruce Richardson:
Quoted 7 lines
Add a note for the preference of using "()" rather than "\" for line continuations in meson.
Suggested-by David Marchand <[email protected]>Signed-off-by Bruce Richardson <[email protected]>--- doc/guides/contributing/coding_style.rst | 10 ++++++++++
This is not the Meson guide.
doc/guides/contributing/coding_style.rst The following guidelines apply to the build system code in meson.build files in · line 1028
Quoted 8 lines
doc/guides/contributing/coding_style.rst +2
-0@@ -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?
Quoted 8 lines
doc/guides/contributing/coding_style.rst +8
-0+ +Example:: + + if (condition1 and condition2 # line breaks inside () need no escaping + and condition3 and condition4) + x = y + endif +
Quoted 11 lines · Thomas Monjalon
15/09/2021 11:50, Bruce Richardson:
Quoted 7 lines
Add a note for the preference of using "()" rather than "\" for line continuations in meson.
Suggested-by David Marchand <[email protected]>Signed-off-by Bruce Richardson <[email protected]>--- 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.
:-)
Quoted 11 lines
doc/guides/contributing/coding_style.rst The following guidelines apply to the build system code in meson.build files in · line 1028
Quoted 8 lines
doc/guides/contributing/coding_style.rst +2
-0@@ -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
16/09/2021 10:31, Bruce Richardson:
Quoted 27 lines · Thomas Monjalon
Quoted 11 lines
15/09/2021 11:50, Bruce Richardson:
Quoted 7 lines
Add a note for the preference of using "()" rather than "\" for line continuations in meson.
Suggested-by David Marchand <[email protected]>Signed-off-by Bruce Richardson <[email protected]>--- 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.
:-)Quoted 11 lines
doc/guides/contributing/coding_style.rst The following guidelines apply to the build system code in meson.build files in · line 1028
Quoted 8 lines
doc/guides/contributing/coding_style.rst +2
-0@@ -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?
Quoted 5 lines
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.