From 2b7885d069d6237ac2a498cf09109e26fdc39d27 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Mon, 11 Mar 2024 07:06:20 +0000 Subject: [PATCH 1/2] Auto-update with pre-commit (#1430) (cherry picked from commit 0301331d548a771271a68e9d26771fe38c1bebb2) --- .pre-commit-config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 6da427c6ee..dc3b3e837d 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -62,7 +62,7 @@ repos: # CPP hooks - repo: https://github.com/pre-commit/mirrors-clang-format - rev: v17.0.6 + rev: v18.1.0 hooks: - id: clang-format args: ['-fallback-style=none', '-i'] From 6dfc1bcc5d26f97f20477d8f9bdae95242c729b6 Mon Sep 17 00:00:00 2001 From: Christoph Froehlich Date: Tue, 12 Mar 2024 22:13:43 +0000 Subject: [PATCH 2/2] Satisfy clang --- .../test/test_controller_manager_srvs.cpp | 12 ++++-------- controller_manager/test/test_spawner_unspawner.cpp | 3 +-- .../test_force_torque_sensor.cpp | 3 +-- joint_limits/include/joint_limits/joint_limits.hpp | 9 +++------ 4 files changed, 9 insertions(+), 18 deletions(-) diff --git a/controller_manager/test/test_controller_manager_srvs.cpp b/controller_manager/test/test_controller_manager_srvs.cpp index 9e211f1254..b129c95e0e 100644 --- a/controller_manager/test/test_controller_manager_srvs.cpp +++ b/controller_manager/test/test_controller_manager_srvs.cpp @@ -780,8 +780,7 @@ TEST_F(TestControllerManagerSrvs, list_sorted_complex_chained_controllers) auto get_ctrl_pos = [result](const std::string & controller_name) -> int64_t { auto it = std::find_if( - result->controller.begin(), result->controller.end(), - [controller_name](auto itf) + result->controller.begin(), result->controller.end(), [controller_name](auto itf) { return (itf.name.find(controller_name) != std::string::npos); }); return std::distance(result->controller.begin(), it); }; @@ -992,8 +991,7 @@ TEST_F(TestControllerManagerSrvs, list_sorted_independent_chained_controllers) auto get_ctrl_pos = [result](const std::string & controller_name) -> int64_t { auto it = std::find_if( - result->controller.begin(), result->controller.end(), - [controller_name](auto itf) + result->controller.begin(), result->controller.end(), [controller_name](auto itf) { return (itf.name.find(controller_name) != std::string::npos); }); return std::distance(result->controller.begin(), it); }; @@ -1269,8 +1267,7 @@ TEST_F(TestControllerManagerSrvs, list_large_number_of_controllers_with_chains) auto get_ctrl_pos = [result](const std::string & controller_name) -> int64_t { auto it = std::find_if( - result->controller.begin(), result->controller.end(), - [controller_name](auto itf) + result->controller.begin(), result->controller.end(), [controller_name](auto itf) { return (itf.name.find(controller_name) != std::string::npos); }); return std::distance(result->controller.begin(), it); }; @@ -1494,8 +1491,7 @@ TEST_F(TestControllerManagerSrvs, list_sorted_large_chained_controller_tree) auto get_ctrl_pos = [result](const std::string & controller_name) -> int64_t { auto it = std::find_if( - result->controller.begin(), result->controller.end(), - [controller_name](auto itf) + result->controller.begin(), result->controller.end(), [controller_name](auto itf) { return (itf.name.find(controller_name) != std::string::npos); }); return std::distance(result->controller.begin(), it); }; diff --git a/controller_manager/test/test_spawner_unspawner.cpp b/controller_manager/test/test_spawner_unspawner.cpp index 7c03a8862d..15cf557c86 100644 --- a/controller_manager/test/test_spawner_unspawner.cpp +++ b/controller_manager/test/test_spawner_unspawner.cpp @@ -233,8 +233,7 @@ TEST_F(TestLoadController, unload_on_kill) // Launch spawner with unload on kill // timeout command will kill it after the specified time with signal SIGINT std::stringstream ss; - ss << "timeout --signal=INT 5 " - << "ros2 run controller_manager spawner " + ss << "timeout --signal=INT 5 " << "ros2 run controller_manager spawner " << "ctrl_3 -c test_controller_manager -t " << std::string(test_controller::TEST_CONTROLLER_CLASS_NAME) << " --unload-on-kill"; diff --git a/hardware_interface/test/test_hardware_components/test_force_torque_sensor.cpp b/hardware_interface/test/test_hardware_components/test_force_torque_sensor.cpp index d226e08fd9..47b19f9769 100644 --- a/hardware_interface/test/test_hardware_components/test_force_torque_sensor.cpp +++ b/hardware_interface/test/test_hardware_components/test_force_torque_sensor.cpp @@ -43,8 +43,7 @@ class TestForceTorqueSensor : public SensorInterface { if ( std::find_if( - state_interfaces.begin(), state_interfaces.end(), - [&ft_key](const auto & interface_info) + state_interfaces.begin(), state_interfaces.end(), [&ft_key](const auto & interface_info) { return interface_info.name == ft_key; }) == state_interfaces.end()) { return CallbackReturn::ERROR; diff --git a/joint_limits/include/joint_limits/joint_limits.hpp b/joint_limits/include/joint_limits/joint_limits.hpp index fffab7a841..6ae0bba0bc 100644 --- a/joint_limits/include/joint_limits/joint_limits.hpp +++ b/joint_limits/include/joint_limits/joint_limits.hpp @@ -122,14 +122,11 @@ struct SoftJointLimits { std::stringstream ss_output; - ss_output << " soft position limits: " - << "[" << min_position << ", " << max_position << "]\n"; + ss_output << " soft position limits: " << "[" << min_position << ", " << max_position << "]\n"; - ss_output << " k-position: " - << "[" << k_position << "]\n"; + ss_output << " k-position: " << "[" << k_position << "]\n"; - ss_output << " k-velocity: " - << "[" << k_velocity << "]\n"; + ss_output << " k-velocity: " << "[" << k_velocity << "]\n"; return ss_output.str(); }