Skip to content

Commit

Permalink
Enable Linters on Eigen, geometry_msgs and KDL
Browse files Browse the repository at this point in the history
  • Loading branch information
gleichdick committed Jan 29, 2021
1 parent 171cfe0 commit 6abb6b5
Show file tree
Hide file tree
Showing 6 changed files with 39 additions and 2 deletions.
12 changes: 12 additions & 0 deletions tf2_eigen/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,18 @@ install(DIRECTORY include/${PROJECT_NAME}/

if(BUILD_TESTING)
find_package(ament_cmake_gtest REQUIRED)
list(APPEND AMENT_LINT_AUTO_EXCLUDE
ament_cmake_cppcheck
ament_cmake_uncrustify
ament_cmake_copyright
)
find_package(ament_lint_auto REQUIRED)
find_package(ament_cmake_uncrustify REQUIRED)
find_package(ament_cmake_cppcheck REQUIRED)
ament_lint_auto_find_test_dependencies()
ament_cppcheck(LANGUAGE "c++")
ament_uncrustify(LANGUAGE "c++")

ament_add_gtest(tf2_eigen-test test/tf2_eigen-test.cpp)
if(TARGET tf2_eigen-test)
target_include_directories(tf2_eigen-test PUBLIC
Expand Down
2 changes: 2 additions & 0 deletions tf2_eigen/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@
<test_depend>ament_cmake_gtest</test_depend>

<build_export_depend>eigen</build_export_depend>
<test_depend>ament_lint_auto</test_depend>
<test_depend>ament_lint_common</test_depend>

<export>
<build_type>ament_cmake</build_type>
Expand Down
11 changes: 11 additions & 0 deletions tf2_geometry_msgs/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,17 @@ ament_auto_find_build_dependencies(REQUIRED ${required_dependencies})
if(BUILD_TESTING)
find_package(ament_cmake_gtest REQUIRED)
find_package(rclcpp REQUIRED)

find_package(ament_cmake_cppcheck REQUIRED)
find_package(ament_cmake_cpplint REQUIRED)
find_package(ament_cmake_lint_cmake REQUIRED)
find_package(ament_cmake_uncrustify REQUIRED)

ament_cppcheck(LANGUAGE "c++")
ament_cpplint()
ament_lint_cmake()
ament_uncrustify(LANGUAGE "c++")

ament_add_gtest(test_tf2_geometry_msgs test/test_tf2_geometry_msgs.cpp)
if(TARGET test_tf2_geometry_msgs)
target_include_directories(test_tf2_geometry_msgs PUBLIC include)
Expand Down
2 changes: 2 additions & 0 deletions tf2_geometry_msgs/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@
<exec_depend>tf2_ros_py</exec_depend>

<test_depend>ament_cmake_gtest</test_depend>
<test_depend>ament_lint_auto</test_depend>
<test_depend>ament_lint_common</test_depend>
<test_depend>rclcpp</test_depend>

<export>
Expand Down
12 changes: 10 additions & 2 deletions tf2_kdl/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@ find_package(tf2 REQUIRED)
find_package(tf2_ros REQUIRED)

ament_python_install_package(${PROJECT_NAME}
PACKAGE_DIR src/${PROJECT_NAME})
PACKAGE_DIR src/${PROJECT_NAME})

install(DIRECTORY include/${PROJECT_NAME}/
DESTINATION include/${PROJECT_NAME}
DESTINATION include/${PROJECT_NAME}
)

# TODO(ahcorde): Port python once https://github.com/ros2/orocos_kinematics_dynamics/pull/4 is merged
Expand All @@ -34,6 +34,14 @@ if(BUILD_TESTING)
find_package(rclcpp REQUIRED)
find_package(tf2_msgs REQUIRED)

find_package(ament_cmake_cppcheck REQUIRED)
find_package(ament_cmake_cpplint REQUIRED)
find_package(ament_cmake_lint_cmake REQUIRED)
find_package(ament_cmake_uncrustify REQUIRED)

ament_cppcheck(LANGUAGE "c++")
ament_uncrustify(LANGUAGE "c++")

ament_add_gtest(test_kdl test/test_tf2_kdl.cpp)
target_include_directories(test_kdl PUBLIC
include
Expand Down
2 changes: 2 additions & 0 deletions tf2_kdl/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@
<exec_depend>tf2_ros_py</exec_depend>

<test_depend>ament_cmake_gtest</test_depend>
<test_depend>ament_lint_auto</test_depend>
<test_depend>ament_lint_common</test_depend>
<test_depend>rclcpp</test_depend>
<test_depend>tf2_msgs</test_depend>

Expand Down

0 comments on commit 6abb6b5

Please sign in to comment.