Is there a clang-format file for ROS 2?
I could not find a clang-format file to apply the rules found in the ROS 2 Developer Guide.
Does anyone know if such a file exists somewhere?
Thanks
ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
I could not find a clang-format file to apply the rules found in the ROS 2 Developer Guide.
Does anyone know if such a file exists somewhere?
Thanks
The file is embedded in the ament_clang_format
package which provides the linter API / CLI: https://github.com/ament/ament_lint/b...
We have a tool for checking and apply style with clang format called ament_clang_format
(CLI tool and cmake logic to make it an automated test). However, we do not test against this right now, and I don't think ament_clang_format
can cleanly apply to our code standard, due to some limitations in clang format w.r.t. to wrapping of arguments.
@mjcarroll was looking at resolving this at some point but never finished.
As @dirk-thomas mentioned we have a style file in that package, but again, if you tried to check our code base with it there would be diff's.
The one we use right now is ament_uncrustify
which uses uncrustify and a definition file there to check our style. We also use ament_cpplint
which uses a patched version of Google's cpplint.py
to do some additional style-like checks.
You can see the list of "default" linters here:
https://github.com/ament/ament_lint/b...
And you can see that for now clang_format is commented out.
Asked: 2019-06-07 10:55:39 -0600
Seen: 1,766 times
Last updated: Jun 07 '19
Why am I getting NO_PUBKEY F42ED6FBAB17C654??
ros2 difference between colcon test and launch_test
Why does ROS2 not have pcl::toRosMsg? Deprecated?
How can I install costmap_converter_msgs (ROS2)?
Message loss when using mcap compression in ROS 2 bag recording
rosdep packages for debian bullseye
CPU Issues on ROS2 multiple robots