This is an automated email from Gerrit. "Antonio Borneo <borneo.anto...@gmail.com>" just uploaded a new patch set to Gerrit, which you can find at https://review.openocd.org/c/openocd/+/8199
-- gerrit commit 708e1d92101e28f7cbd33f6207231ee47676d01c Author: Antonio Borneo <borneo.anto...@gmail.com> 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 <borneo.anto...@gmail.com> diff --git a/doc/manual/style.txt b/doc/manual/style.txt index 1d3ec6748d..a1e6b8f016 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: --