-
Notifications
You must be signed in to change notification settings - Fork 155
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
fix most cpplint and uncrustify errors #72
Conversation
437ddae
to
b053d84
Compare
@ros-pull-request-builder retest this please |
82fd4f3
to
8afc519
Compare
prereleased passed on indigo and kinetic, merging this |
@mikaelarguedas , this PR breaks ROS style pretty severely. Why was it decided to apply a different style? I can provide a clang-format file we use at Clearpath that implements the ROS style pretty closely if you like. |
@jasonimercer Thanks for the feedback. This PR applied the ROS 2 style here to keep the diff between the 2 branches manageable. I didnt realize it was breaking ROS 1 style significantly, I (wrongly) assumed that the ROS2 style was just more restrictive than its' ROS1 counterpart but not conflicting.
Yes I would be interested in seeing the differences or at least pin down the rules that are not compatible between the 2 style guides. |
:( I didn't know the ROS 2 style was so different. Thanks for pointing me towards it. This is the clang format we've been using in Navigation & Controls at Clearpath: We based it on https://github.com/davetcoleman/roscpp_code_format before they pulled in MoveIt's version. |
The brace style between ROS 1 and ROS 2 is completely different— in ROS 1 style, the mandate was never to cuddle: http://wiki.ros.org/CppStyleGuide#Formatting The long-standing policy in core repos like ros_comm has been to avoid code style fixes in the name of not breaking patching and porting efforts, which is exactly what this change is doing for us (we have a fork of actionlib for a variety of reasons). Has the policy changed? @dirk-thomas @tfoote |
I think it is mostly a decision of each maintainer rather than a "general policy". Especially in |
@mikepurvis @jasonimercer Sorry for the late response. As this issue will span much more than this repository in the future (all ros_base and robot_model packages having been converted to the ROS 2 style already), I wanted to flush out all the conflicts between the style guides and come up with a way forward to reconcile the styles rather than just reverting this. There is a proposal of ROS 1 style relaxation available at https://discourse.ros.org/t/rfc-proposal-to-reconcile-ros-1-and-ros-2-c-style-guides/4616, any feedback is welcome.
My understanding was that this policy was for maintainers maintaining several branches of their ROS 1 repositories (rather than accommodating people maintaining a fork). This was actually the motivation for this change as I wanted the style cleanup to be performed before branching out for melodic. I understand the pain of having to convert your patches. If you have anything in this patches that deserve being contributed upstream, please consider doing so, as this can reduce the friction when things change on the upstream repository. I assume that by now the matching changes have been performed on your side, let me know if this is not the case and I can look into reverting the brace changes to reduce conflict resolution burden. |
This enforces google styleguide.
What is not enforced in this PR:
using namespace