diff options
author | Steffan Karger | 2017-01-14 15:10:20 +0100 |
---|---|---|
committer | David Sommerseth | 2017-01-18 20:51:27 +0100 |
commit | 4cd4899e8e80efae03c584a760fd107251735723 (patch) | |
tree | 2ea0667be64598f559d8028e1712f8917762809c /dev-tools | |
parent | 7b02cc2aa8318dc8f2677064dadcbec295b2f937 (diff) | |
download | openvpn-4cd4899e8e80efae03c584a760fd107251735723.zip openvpn-4cd4899e8e80efae03c584a760fd107251735723.tar.gz |
More broadly enforce Allman style and braces-around-conditionals
We want { and } aligned, which means also adding a newline between each
for() and {, while() and {, etc.
Also, we agreed to always use braces with conditionals. The previous
uncrustify config added these for if()s, now also add these for while()
and for().
Signed-off-by: Steffan Karger <steffan@karger.me>
Acked-by: Gert Doering <gert@greenie.muc.de>
Message-Id: <1484403020-6857-1-git-send-email-steffan@karger.me>
URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg13875.html
Signed-off-by: David Sommerseth <davids@openvpn.net>
Diffstat (limited to 'dev-tools')
-rw-r--r-- | dev-tools/uncrustify.conf | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/dev-tools/uncrustify.conf b/dev-tools/uncrustify.conf index 95e0b2a..d8ea870 100644 --- a/dev-tools/uncrustify.conf +++ b/dev-tools/uncrustify.conf @@ -9,6 +9,11 @@ nl_brace_else=add nl_elseif_brace=add nl_else_brace=add nl_else_if=remove +nl_for_brace=add +nl_while_brace=add +nl_switch_brace=add +nl_fdef_brace=add +nl_do_brace=add sp_func_proto_paren=Remove sp_func_def_paren=Remove sp_func_call_paren=Remove @@ -44,6 +49,9 @@ nl_after_func_proto=2 # Always use scoping braces for conditionals mod_full_brace_if=add mod_full_brace_if_chain=false +mod_full_brace_while=add +mod_full_brace_for=add +mod_full_brace_do=add # Annotate #else and #endif statements mod_add_long_ifdef_endif_comment=20 |