rosflight / rosflight_ros_pkgs

ROS packages for the ROSflight autopilot
http://rosflight.org/
BSD 3-Clause "New" or "Revised" License
86 stars 56 forks source link

Clang format 2 #135

Closed dpkoch closed 4 years ago

dpkoch commented 4 years ago

This supersedes #133

For the most part it's the same. The only difference is that I got rid of the include order groupings since they were a mess, and set it to "Preserve" which means it will keep the current blocks but sort alphabetically within them. Something more sophisticated might be nice in the future, but that seemed reasonable to me for now. I couldn't do this in #133 because the clang-format there had already made a mess of the include groupings so just re-running it with new settings wouldn't fix it.

I also changed the remaining <stdio.h> type includes to <cstdio> type includes. I also added a script to run clang-format on everything.

For some reason, even though we've set PointerAlignment: Left, that's not working. If we can fix that later, cool.

Also, I hate that for the constructor initializer lists, there's no option to always put one per line. It can only do "all on one line or one per line." That's pretty ugly to me, but oh well.

Overall it's not perfect, but I think it's reasonably good.