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 -0500
Seen: 1,934 times
Last updated: Jun 07 '19
Echo topic from a docker container from another machine in the same network
How to pick and place with UR10e robot arm
ros2 launch creates two nodes of same type
Using roscpp in existing app on Android/iOS
run 64 nodes , cpu utilization becomes 100%
rqt error plugin.xml not found(win10)
rclcpp::Time() and rclcpp::Clock()