Redundant test dependencies in package.xml of unitree_ros
Hello, after building and testing this project with branch main, I found something unexpected.
I noticed the package.xml file in the package unitree_ros contains the following content which means a format check.
<test_depend>ament_lint_auto</test_depend>
<test_depend>ament_lint_common</test_depend>
But there are no test section in CMakeLists.txt resulting in no testing programs to run actually.
So I think if we want the ament_lint tools to do a format check, maybe need add the testing section in the CMakeLists.txt like following:
if(BUILD_TESTING)
find_package(ament_lint_auto REQUIRED)
ament_lint_auto_find_test_dependencies()
endif()
After adding the content, amen_lint_tools like ament_copyright, ament_lint_cmake, ament_xmllint, can be executed correctly when I use colcon test command.
But there are some format errors after testing. Here is the result file:
unitree_ros.log 1:copyright 3:cpplint 4:flake8 5:lint_cmake 6:pep257 7:uncrustify
If we do not need the ament_lint_tools, I think the test_depend might be a redundant dependency that could be removed to reduce the burden of project maintenance.
I would appreciate it if you could tell me how do you think of this?
Thanks!
Dear @Plumezz,
Thank you for raising this issue. Yes, these packages listed on the package.xml are redundant and are not used at all.
Now, adding them is not a bad idea, as to it can improve the package quality itself, specially the copyright notice.
When looking through the logs, almost all, if not all are actually related to third-party libraries like it's the case with the unitree_legged_sdk to which we don't necessary have control. Perhaps there is a way to ignore those. I have never done this myself, so I cannot tell.