Skip to content

Commit

Permalink
Set indent_paren_open_brace=true
Browse files Browse the repository at this point in the history
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<ListParameters>(
        "invalid_service?"
      );
    },
      rclcpp::exceptions::InvalidServiceNameError
    );
```
GOOD:
```
    ASSERT_THROW(
      {
        auto client = node->create_client<ListParameters>(
          "invalid_service?"
        );
      },
      rclcpp::exceptions::InvalidServiceNameError
    );
```

Signed-off-by: Dan Rose <dan@digilabs.io>
  • Loading branch information
rotu committed Jul 17, 2019
1 parent c8f3ad6 commit 49595c2
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -769,7 +769,7 @@ indent_braces_no_struct = false # false/true
indent_brace_parent = false # false/true

# Indent based on the paren open instead of the brace open in '({\n', default is to indent by brace.
indent_paren_open_brace = false # false/true
indent_paren_open_brace = true # false/true

# indent a C# delegate by another level, default is to not indent by another level.
indent_cs_delegate_brace = false # false/true
Expand Down

0 comments on commit 49595c2

Please sign in to comment.