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 #504

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
QDir::toNativeSeparators(
QString::fromStdString(
package_share_directory +
"/config/visual_tests_test_image_config.rviz")));
Copy link
Member

Choose a reason for hiding this comment

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

This is another instance where I think the rule is too aggressive. I think this is what should have been produced:

    visualizer_app_->loadConfig(QDir::toNativeSeparators(
      QString::fromStdString(
        package_share_directory + "/config/visual_tests_test_image_config.rviz")));

Actually this is probably best:

    visualizer_app_->loadConfig(QDir::toNativeSeparators(QString::fromStdString(
      package_share_directory + "/config/visual_tests_test_image_config.rviz")));

but given the original code, the first is reasonable for the linter to produce.

Basically it should be greedy, trying to get as many ( on the first line so long as the matching ) are not followed by additional arguments. I would, again, guess that the linter cannot handle such logic. So I guess it's more of a point in favor of maybe leaving this setting unset rather than deal with the "false positives" or "over matching" issues.

@dirk-thomas dirk-thomas merged commit b8dbf6e into ros2 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
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