how to make ros cpplint use a relative path for header guard check
Is there a way to force the ccpplint used by ros2 in ament to use a relative path starting at ros2_overylay_ws/src instead of the explicit full path when checking header guards?
Can you edit your question to also describe your folder layout exactly (maybe use the output of
tree
) and the exact command you're running and what folder it is in? Have you tried manually setting the--root
option?I am using the command ament test . I am not sure how to add the --root option. A portion of my directory structure is as follows: project location: /home/dennis/Projects/ros2_overlay_ws/src/small_robot
within small_robot : common/include common/src vms/contoller/include vms/controller/src
the cpplint mesage is as follows: No #ifndef header guard found, suggested CPP variable is: __HOME__DENNIS__PROJECTS__ROS2_OVERLAY_WS__SRC__SMALL_ROBOT__VMS__COMMON__INCLUDE__VMS_COMMON__ATTRIBUTE_HPP_ [build/header_guard] [5]
The header guard for his file is #ifndef __SMALL_ROBOT__VMS__COMMON__ATTRIBUTE_HPP_ I do not want to include the user specifc path portio "/home/dennis/projects/ros2_overlay_ws/src"
lastly, sorry if my explanatio is confusing. I showed two example directory structures. the directory structure for the specific error message I provided is small_robot/vms/common/attribute.h within /home/dennis/Projects/ros2_overlay_ws/src