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,948 times
Last updated: Jun 07 '19
trying to install Ros2 on Ubuntu 20.04, but it doesn't work
how to organize data transfer between nodes on multiple PCs on ROS2
Waiting for TransformListener with ROS2 and Python?
[ROS2] How to set QoS policy for topic in cpp script
I am getting an error using Ros2 Iron and micro-ROS on RP2040
Using ROS2 for autonomous driving
ROS2 Bag - DB3 CDR Deserialization
Why image not recieved using ROS2 functions in the node?
[ROS2] asyncio await with timeout a service call in a callback