Skip to content

Commit

Permalink
Bump version of pre-commit hooks (backport #1430) (#1435)
Browse files Browse the repository at this point in the history
  • Loading branch information
mergify[bot] authored Mar 14, 2024
1 parent 41e61bc commit 114a029
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 19 deletions.
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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']
Expand Down
12 changes: 4 additions & 8 deletions controller_manager/test/test_controller_manager_srvs.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -781,8 +781,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);
};
Expand Down Expand Up @@ -993,8 +992,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);
};
Expand Down Expand Up @@ -1270,8 +1268,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);
};
Expand Down Expand Up @@ -1495,8 +1492,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);
};
Expand Down
3 changes: 1 addition & 2 deletions controller_manager/test/test_spawner_unspawner.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -264,8 +264,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";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
9 changes: 3 additions & 6 deletions joint_limits/include/joint_limits/joint_limits.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -128,14 +128,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();
}
Expand Down

0 comments on commit 114a029

Please sign in to comment.