From 468e030d6c484dc3cd0b44b501099ead4a238565 Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Tue, 12 Mar 2024 18:23:26 +0100 Subject: [PATCH] Bump version of pre-commit hooks (#1073) (#1074) (cherry picked from commit 28cb552903a9d17264594efeb148f8b04bda3039) Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- .pre-commit-config.yaml | 2 +- .../src/joint_trajectory_controller.cpp | 6 ++---- .../test/test_trajectory_controller_utils.hpp | 7 +++---- 3 files changed, 6 insertions(+), 9 deletions(-) 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'] diff --git a/joint_trajectory_controller/src/joint_trajectory_controller.cpp b/joint_trajectory_controller/src/joint_trajectory_controller.cpp index 569c47da83..9e450d0750 100644 --- a/joint_trajectory_controller/src/joint_trajectory_controller.cpp +++ b/joint_trajectory_controller/src/joint_trajectory_controller.cpp @@ -477,8 +477,7 @@ bool JointTrajectoryController::read_state_from_command_interfaces(JointTrajecto auto interface_has_values = [](const auto & joint_interface) { return std::find_if( - joint_interface.begin(), joint_interface.end(), - [](const auto & interface) + joint_interface.begin(), joint_interface.end(), [](const auto & interface) { return std::isnan(interface.get().get_value()); }) == joint_interface.end(); }; @@ -548,8 +547,7 @@ bool JointTrajectoryController::read_commands_from_command_interfaces( auto interface_has_values = [](const auto & joint_interface) { return std::find_if( - joint_interface.begin(), joint_interface.end(), - [](const auto & interface) + joint_interface.begin(), joint_interface.end(), [](const auto & interface) { return std::isnan(interface.get().get_value()); }) == joint_interface.end(); }; diff --git a/joint_trajectory_controller/test/test_trajectory_controller_utils.hpp b/joint_trajectory_controller/test/test_trajectory_controller_utils.hpp index ac7348724d..d49f522cff 100644 --- a/joint_trajectory_controller/test/test_trajectory_controller_utils.hpp +++ b/joint_trajectory_controller/test/test_trajectory_controller_utils.hpp @@ -244,10 +244,9 @@ class TrajectoryControllerTest : public ::testing::Test { auto has_nonzero_vel_param = std::find_if( - parameters.begin(), parameters.end(), - [](const rclcpp::Parameter & param) { - return param.get_name() == "allow_nonzero_velocity_at_trajectory_end"; - }) != parameters.end(); + parameters.begin(), parameters.end(), [](const rclcpp::Parameter & param) + { return param.get_name() == "allow_nonzero_velocity_at_trajectory_end"; }) != + parameters.end(); std::vector parameters_local = parameters; if (!has_nonzero_vel_param)