From 79012c78fb583f50036e3ba300c757eb4c223778 Mon Sep 17 00:00:00 2001 From: Marcus Scheunemann Date: Fri, 25 Nov 2022 23:28:43 +0000 Subject: [PATCH] linting --- CMakeLists.txt | 12 +++++------- ros1/CMakeLists.txt | 14 +++++++------- ros2/CMakeLists.txt | 2 +- 3 files changed, 13 insertions(+), 15 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index a825404..e01244b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -25,16 +25,14 @@ find_package(rosidl_default_generators REQUIRED) rosidl_generate_interfaces(${PROJECT_NAME} "msg/RslidarPacket.msg" DEPENDENCIES builtin_interfaces std_msgs - ) +) if(BUILD_TESTING) find_package(ament_lint_auto REQUIRED) - # the following line skips the linter which checks for copyrights - # uncomment the line when a copyright and license is not present in all source files - #set(ament_cmake_copyright_FOUND TRUE) - # the following line skips cpplint (only works in a git repo) - # uncomment the line when this package is not in a git repo - #set(ament_cmake_cpplint_FOUND TRUE) + # skip copyright and license + set(ament_cmake_copyright_FOUND TRUE) + # skip copyright note per file + set(ament_cmake_cpplint_FOUND TRUE) ament_lint_auto_find_test_dependencies() endif() diff --git a/ros1/CMakeLists.txt b/ros1/CMakeLists.txt index 320fb43..a91ba4b 100644 --- a/ros1/CMakeLists.txt +++ b/ros1/CMakeLists.txt @@ -23,19 +23,19 @@ find_package(catkin REQUIRED COMPONENTS std_msgs sensor_msgs message_generation - ) +) add_message_files(FILES RslidarPacket.msg - ) +) -generate_messages(DEPENDENCIES +generate_messages(DEPENDENCIES std_msgs sensor_msgs - ) +) -catkin_package(CATKIN_DEPENDS - std_msgs +catkin_package(CATKIN_DEPENDS + std_msgs sensor_msgs message_runtime - ) +) diff --git a/ros2/CMakeLists.txt b/ros2/CMakeLists.txt index a825404..8248045 100644 --- a/ros2/CMakeLists.txt +++ b/ros2/CMakeLists.txt @@ -25,7 +25,7 @@ find_package(rosidl_default_generators REQUIRED) rosidl_generate_interfaces(${PROJECT_NAME} "msg/RslidarPacket.msg" DEPENDENCIES builtin_interfaces std_msgs - ) +) if(BUILD_TESTING) find_package(ament_lint_auto REQUIRED)