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?
Originally posted by dennis.bergin on ROS Answers with karma: 1 on 2018-03-14
Post score: 0
Original comments
Comment by William on 2018-03-14:
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?
Comment by dennis.bergin on 2018-03-17:
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
Comment by dennis.bergin on 2018-03-17:
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]
Comment by dennis.bergin on 2018-03-17:
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"
Comment by dennis.bergin on 2018-03-17:
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