From e20ab7d1e37b67fb49dba7094621fd7ce1388a26 Mon Sep 17 00:00:00 2001 From: Chris Lalancette Date: Fri, 30 Oct 2026 12:59:03 +0000 Subject: [PATCH] Remove custom ament_cppcheck usage. ament_cppcheck has been effectively dead since 2022, when it was disabled for the 2.x versions having very long scan times. We haven't seemed to miss it in the intervening 4 years, so I think it is time to stop using it at all. Remove the custom ament_cppcheck setup in this repository. Signed-off-by: Chris Lalancette --- rclcpp/CMakeLists.txt | 6 +----- rclcpp_action/CMakeLists.txt | 8 -------- rclcpp_components/CMakeLists.txt | 2 -- rclcpp_lifecycle/CMakeLists.txt | 8 -------- 4 files changed, 1 insertion(+), 23 deletions(-) diff --git a/rclcpp/CMakeLists.txt b/rclcpp/CMakeLists.txt index e0290abeb0..8d8a77e9b9 100644 --- a/rclcpp/CMakeLists.txt +++ b/rclcpp/CMakeLists.txt @@ -266,12 +266,8 @@ install( DESTINATION include/${PROJECT_NAME} ) -if(TEST cppcheck) - # must set the property after ament_package() - set_tests_properties(cppcheck PROPERTIES TIMEOUT 1200) -endif() - if(TEST cpplint) + # must set the property after ament_package() set_tests_properties(cpplint PROPERTIES TIMEOUT 180) endif() diff --git a/rclcpp_action/CMakeLists.txt b/rclcpp_action/CMakeLists.txt index 37084c9728..dd70532156 100644 --- a/rclcpp_action/CMakeLists.txt +++ b/rclcpp_action/CMakeLists.txt @@ -72,9 +72,6 @@ ament_export_dependencies(action_msgs rcl_action rclcpp rosidl_runtime_c) if(BUILD_TESTING) find_package(ament_cmake_gtest REQUIRED) find_package(ament_lint_auto REQUIRED) - # Give cppcheck hints about macro definitions coming from outside this package - get_target_property(rclcpp_include_dirs rclcpp::rclcpp INTERFACE_INCLUDE_DIRECTORIES) - set(ament_cmake_cppcheck_ADDITIONAL_INCLUDE_DIRS ${rclcpp_include_dirs}) ament_lint_auto_find_test_dependencies() add_subdirectory(test/benchmark) @@ -160,8 +157,3 @@ if(BUILD_TESTING) endif() ament_package() - -if(TEST cppcheck) - # must set the property after ament_package() - set_tests_properties(cppcheck PROPERTIES TIMEOUT 600) -endif() diff --git a/rclcpp_components/CMakeLists.txt b/rclcpp_components/CMakeLists.txt index e9d5924703..4e52378246 100644 --- a/rclcpp_components/CMakeLists.txt +++ b/rclcpp_components/CMakeLists.txt @@ -89,8 +89,6 @@ if(BUILD_TESTING) find_package(ament_lint_auto REQUIRED) find_package(ament_cmake_google_benchmark REQUIRED) find_package(benchmark REQUIRED) - # Give cppcheck hints about macro definitions coming from outside this package - get_target_property(ament_cmake_cppcheck_ADDITIONAL_INCLUDE_DIRS benchmark::benchmark INTERFACE_INCLUDE_DIRECTORIES) ament_lint_auto_find_test_dependencies() set(components "") diff --git a/rclcpp_lifecycle/CMakeLists.txt b/rclcpp_lifecycle/CMakeLists.txt index 0515296b96..7e153f34f2 100644 --- a/rclcpp_lifecycle/CMakeLists.txt +++ b/rclcpp_lifecycle/CMakeLists.txt @@ -57,16 +57,8 @@ install(DIRECTORY include/ if(BUILD_TESTING) find_package(ament_lint_auto REQUIRED) - # Give cppcheck hints about macro definitions coming from outside this package - get_target_property(rclcpp_include_dirs rclcpp::rclcpp INTERFACE_INCLUDE_DIRECTORIES) - set(ament_cmake_cppcheck_ADDITIONAL_INCLUDE_DIRS ${rclcpp_include_dirs}) - list(APPEND AMENT_LINT_AUTO_EXCLUDE "ament_cmake_cppcheck") ament_lint_auto_find_test_dependencies() - find_package(ament_cmake_cppcheck REQUIRED) - ament_cppcheck() - set_tests_properties(cppcheck PROPERTIES TIMEOUT 360) - find_package(performance_test_fixture REQUIRED) add_performance_test(