From 97f17770f80f585b7814abcbf9b8cf418af8ef81 Mon Sep 17 00:00:00 2001 From: Dan Rose Date: Wed, 17 Jul 2019 13:48:48 -0500 Subject: [PATCH] Add line break after first open paren in multiline function call Signed-off-by: Dan Rose maintain alignment Signed-off-by: Dan Rose Set indent_paren_open_brace=true Since we indent the arguments after a newline, this prevents a visual dedent when using a braced argument: BAD: ``` ASSERT_THROW( { auto client = node->create_client( "invalid_service?" ); }, rclcpp::exceptions::InvalidServiceNameError ); ``` GOOD: ``` ASSERT_THROW( { auto client = node->create_client( "invalid_service?" ); }, rclcpp::exceptions::InvalidServiceNameError ); ``` Signed-off-by: Dan Rose Revert "Set indent_paren_open_brace=true" This reverts commit 49595c230a55a90db8544845ca157127f6246afe. As it turns out, indent_paren_open_brace has other affects and the actual bug was indent_align_paren Signed-off-by: Dan Rose --- .../ament_uncrustify/configuration/ament_code_style.cfg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ament_uncrustify/ament_uncrustify/configuration/ament_code_style.cfg b/ament_uncrustify/ament_uncrustify/configuration/ament_code_style.cfg index 24f3e325..d030ece7 100644 --- a/ament_uncrustify/ament_uncrustify/configuration/ament_code_style.cfg +++ b/ament_uncrustify/ament_uncrustify/configuration/ament_code_style.cfg @@ -1361,7 +1361,7 @@ nl_func_def_empty = ignore # ignore/add/remove/force nl_func_call_empty = ignore # ignore/add/remove/force # Whether to add newline after '(' in a function call if '(' and ')' are in different lines. -nl_func_call_start_multi_line = false # false/true +nl_func_call_start_multi_line = true # false/true # Whether to add newline after each ',' in a function call if '(' and ')' are in different lines. nl_func_call_args_multi_line = false # false/true