From: openocd-gerrit <ope...@us...> - 2024-05-04 08:22:12
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "Main OpenOCD repository". The branch, master has been updated via 495311d2067e85ee1fb53593a4671ef0ec09c6f1 (commit) from 04154af5d6cd5fe76a2583778379bdacb5aa6fb0 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 495311d2067e85ee1fb53593a4671ef0ec09c6f1 Author: Antonio Borneo <bor...@gm...> Date: Sun Apr 7 12:41:48 2024 +0200 doc: style: report indentation of multi-line condition To help readability and discriminate the 'then' block from the multi-line condition, suggest to increase the indentation of the condition. Change-Id: I02e3834be3001e7ecf24349ad3cefe94b27b79c8 Signed-off-by: Antonio Borneo <bor...@gm...> Reviewed-on: https://review.openocd.org/c/openocd/+/8199 Reviewed-by: Tomas Vanek <va...@fb...> Tested-by: jenkins Reviewed-by: Oleksij Rempel <li...@re...> diff --git a/doc/manual/style.txt b/doc/manual/style.txt index 1d3ec6748..a1e6b8f01 100644 --- a/doc/manual/style.txt +++ b/doc/manual/style.txt @@ -97,6 +97,21 @@ OpenOCD project. x = 0; } @endcode +- on <tt> if </tt> statements where the condition is split among multiple + lines, increase the indentation of the condition to prevent it to match + to the indentation of the <tt> then </tt> block due to length of 'if (' + being same of the TAB width of 4 characters. Use: + @code + if (CMD_ARGC < 3 + || CMD_ARGC > 8) + return ERROR_COMMAND_SYNTAX_ERROR; + @endcode + instead of: + @code + if (CMD_ARGC < 3 || + CMD_ARGC > 8) + return ERROR_COMMAND_SYNTAX_ERROR; + @endcode Finally, try to avoid lines of code that are longer than 72-80 columns: ----------------------------------------------------------------------- Summary of changes: doc/manual/style.txt | 15 +++++++++++++++ 1 file changed, 15 insertions(+) hooks/post-receive -- Main OpenOCD repository |