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..e5ae051 100644 --- a/motion_capture_tracking/CMakeLists.txt +++ b/motion_capture_tracking/CMakeLists.txt @@ -80,16 +80,30 @@ 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/*" + ) + # 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 + 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() + + find_package(ament_cmake_lint_cmake REQUIRED) + ament_lint_cmake("${CMAKE_CURRENT_LIST_FILE}") +endif() # Install launch files. install(DIRECTORY diff --git a/motion_capture_tracking/deps/.ament_ignore b/motion_capture_tracking/deps/.ament_ignore new file mode 100644 index 0000000..e69de29 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=- 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