From 353063f522e8ee71d20f6cb197aed3c315c4fcc1 Mon Sep 17 00:00:00 2001 From: Wolfgang Hoenig Date: Tue, 21 Jul 2026 23:42:52 +0200 Subject: [PATCH 1/5] enable linter for node code --- .github/workflows/ROS.yml | 1 - motion_capture_tracking/CMakeLists.txt | 26 ++++++++++++++++---------- 2 files changed, 16 insertions(+), 11 deletions(-) diff --git a/.github/workflows/ROS.yml b/.github/workflows/ROS.yml index f63c26f..da4e048 100644 --- a/.github/workflows/ROS.yml +++ b/.github/workflows/ROS.yml @@ -70,4 +70,3 @@ jobs: with: package-name: motion_capture_tracking target-ros2-distro: ${{ matrix.ros_distribution }} - skip-tests: true diff --git a/motion_capture_tracking/CMakeLists.txt b/motion_capture_tracking/CMakeLists.txt index 300f534..e5e7481 100644 --- a/motion_capture_tracking/CMakeLists.txt +++ b/motion_capture_tracking/CMakeLists.txt @@ -80,16 +80,22 @@ if ((CMAKE_SYSTEM_NAME STREQUAL "Linux") AND (CMAKE_SYSTEM_PROCESSOR STREQUAL "x ) endif() -# 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) -# ament_lint_auto_find_test_dependencies() -# endif() +if(BUILD_TESTING) + find_package(ament_lint_auto REQUIRED) + + # Exclude your deps directory from all linters + set(AMENT_LINT_AUTO_FILE_EXCLUDE + "${CMAKE_CURRENT_SOURCE_DIR}/deps/*" + ) + + # 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) + ament_lint_auto_find_test_dependencies() +endif() # Install launch files. install(DIRECTORY From 1b8411c160769cfc77b2a7ef387e3416eca1904e Mon Sep 17 00:00:00 2001 From: Wolfgang Hoenig Date: Wed, 22 Jul 2026 00:05:51 +0200 Subject: [PATCH 2/5] restrict cpplint --- motion_capture_tracking/deps/CPPLINT.cfg | 1 + 1 file changed, 1 insertion(+) create mode 100644 motion_capture_tracking/deps/CPPLINT.cfg diff --git a/motion_capture_tracking/deps/CPPLINT.cfg b/motion_capture_tracking/deps/CPPLINT.cfg new file mode 100644 index 0000000..2f50e90 --- /dev/null +++ b/motion_capture_tracking/deps/CPPLINT.cfg @@ -0,0 +1 @@ +filter=- From 547142b6d182daefce6325cfd02565044062f58d Mon Sep 17 00:00:00 2001 From: Wolfgang Hoenig Date: Thu, 23 Jul 2026 17:52:19 +0200 Subject: [PATCH 3/5] try to fix some linter errors --- motion_capture_tracking/CMakeLists.txt | 10 ++++++++++ motion_capture_tracking/launch/launch.py | 1 + 2 files changed, 11 insertions(+) diff --git a/motion_capture_tracking/CMakeLists.txt b/motion_capture_tracking/CMakeLists.txt index e5e7481..e0b9d39 100644 --- a/motion_capture_tracking/CMakeLists.txt +++ b/motion_capture_tracking/CMakeLists.txt @@ -95,6 +95,16 @@ if(BUILD_TESTING) # uncomment the line when this package is not in a git repo #set(ament_cmake_cpplint_FOUND TRUE) ament_lint_auto_find_test_dependencies() + + # ament_lint_auto_file_exclude not supported for ament_cmake_lint + # Instead, we manually only run it on this file + set(AMENT_LINT_AUTO_EXCLUDE + ament_cmake_lint_cmake + ) + ament_lint_auto_find_active() + + find_package(ament_cmake_lint_cmake REQUIRED) + ament_lint_cmake("${CMAKE_CURRENT_LIST_FILE}") endif() # Install launch files. diff --git a/motion_capture_tracking/launch/launch.py b/motion_capture_tracking/launch/launch.py index c63d329..723a447 100644 --- a/motion_capture_tracking/launch/launch.py +++ b/motion_capture_tracking/launch/launch.py @@ -1,4 +1,5 @@ import os + from ament_index_python.packages import get_package_share_directory from launch import LaunchDescription from launch_ros.actions import Node From 7b65810c0fae455f9d382a76ef482384289a5bf1 Mon Sep 17 00:00:00 2001 From: Wolfgang Hoenig Date: Thu, 23 Jul 2026 17:58:17 +0200 Subject: [PATCH 4/5] fix CI --- motion_capture_tracking/CMakeLists.txt | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/motion_capture_tracking/CMakeLists.txt b/motion_capture_tracking/CMakeLists.txt index e0b9d39..e5ae051 100644 --- a/motion_capture_tracking/CMakeLists.txt +++ b/motion_capture_tracking/CMakeLists.txt @@ -87,6 +87,11 @@ if(BUILD_TESTING) set(AMENT_LINT_AUTO_FILE_EXCLUDE "${CMAKE_CURRENT_SOURCE_DIR}/deps/*" ) + # ament_lint_auto_file_exclude not supported for ament_cmake_lint + # Instead, we manually only run it on this file + set(AMENT_LINT_AUTO_EXCLUDE + ament_cmake_lint_cmake + ) # 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 @@ -96,13 +101,6 @@ if(BUILD_TESTING) #set(ament_cmake_cpplint_FOUND TRUE) ament_lint_auto_find_test_dependencies() - # ament_lint_auto_file_exclude not supported for ament_cmake_lint - # Instead, we manually only run it on this file - set(AMENT_LINT_AUTO_EXCLUDE - ament_cmake_lint_cmake - ) - ament_lint_auto_find_active() - find_package(ament_cmake_lint_cmake REQUIRED) ament_lint_cmake("${CMAKE_CURRENT_LIST_FILE}") endif() From f5b31b18f41e5c053cf6af656b17b3931734dcd9 Mon Sep 17 00:00:00 2001 From: Wolfgang Hoenig Date: Sat, 25 Jul 2026 23:06:01 +0200 Subject: [PATCH 5/5] add ament_ignore file --- motion_capture_tracking/deps/.ament_ignore | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 motion_capture_tracking/deps/.ament_ignore diff --git a/motion_capture_tracking/deps/.ament_ignore b/motion_capture_tracking/deps/.ament_ignore new file mode 100644 index 0000000..e69de29