ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

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/blob/26397786f603b8e9e4c3c399c3d33b1c6873ee0d/ament_lint_common/package.xml#L15-L23

And you can see that for now clang_format is commented out.