Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

code style only: wrap after open parenthesis if not in one line #203

Merged
merged 1 commit into from
Feb 3, 2020

Conversation

dirk-thomas
Copy link
Member

Style update to match the ROS 2 development guide and pass with the updated linter configuration from ament/ament_lint#210.

Signed-off-by: Dirk Thomas <dirk-thomas@users.noreply.github.com>
@dirk-thomas dirk-thomas self-assigned this Jan 31, 2020
@dirk-thomas dirk-thomas merged commit d7bd057 into master Feb 3, 2020
@delete-merged-branch delete-merged-branch bot deleted the dirk-thomas/nl_func_call_start_multi_line branch February 3, 2020 17:07
@@ -102,7 +105,8 @@ TEST_F(TestTimeFixture, test_rcutils_steady_time_now) {
std::this_thread::sleep_for(std::chrono::milliseconds(100));
// Then take a new timestamp with each and compare.
rcutils_time_point_value_t later;
EXPECT_NO_MEMORY_OPERATIONS({
EXPECT_NO_MEMORY_OPERATIONS(
{
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Btw, these are actually wrong. This should become:

EXPECT_NO_MEMORY_OPERATIONS(
  {
    ret = rcutils_steady_time_now(&later);
  });

Because if you replaced the first argument with a variable name it would be:

EXPECT_NO_MEMORY_OPERATIONS(
  argument);

And not this:

EXPECT_NO_MEMORY_OPERATIONS(
argument);

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't disagree. This is just what uncrustify can do atm. The options are simple:

  • report the problem upstream (or even better contribute a PR to support this in the way we want it)
  • change the configuration options we use which seems to sacrifice other parts of the style
  • not use uncrustify at all if we are unhappy with what it does and just not enforce that level of style

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I know, but I was just pointing it out in case we revisit this in the future. I don't care for the new state, but have time to argue to change it back or fix uncrustify.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants