From 011edafabf34c9f6f61f306cc31e06bbecc0ceaf Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 7 Oct 2024 17:58:04 +0000 Subject: [PATCH 1/2] Update pre-commit hooks to latest versions MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit updates: - [github.com/pre-commit/mirrors-clang-format: v18.1.8 → v19.1.1](https://github.com/pre-commit/mirrors-clang-format/compare/v18.1.8...v19.1.1) - [github.com/astral-sh/ruff-pre-commit: v0.6.3 → v0.6.9](https://github.com/astral-sh/ruff-pre-commit/compare/v0.6.3...v0.6.9) - [github.com/pre-commit/pre-commit-hooks: v4.6.0 → v5.0.0](https://github.com/pre-commit/pre-commit-hooks/compare/v4.6.0...v5.0.0) --- .pre-commit-config.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index a17237696..a66360c71 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -19,7 +19,7 @@ repos: hooks: - id: black - repo: https://github.com/pre-commit/mirrors-clang-format - rev: v18.1.8 + rev: v19.1.1 hooks: - id: clang-format - repo: https://github.com/PyCQA/autoflake @@ -40,7 +40,7 @@ repos: exclude: ^docker|deprecated|NaviGator/simulation/VRX - repo: https://github.com/astral-sh/ruff-pre-commit # Ruff version. - rev: 'v0.6.3' + rev: 'v0.6.9' hooks: - id: ruff args: [--fix, --exit-non-zero-on-fix] @@ -74,7 +74,7 @@ repos: - id: prettier-package-xml - id: sort-package-xml - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v4.6.0 + rev: v5.0.0 hooks: - id: check-added-large-files - id: check-case-conflict From 1f8dce12e0846b2e8bae4f53410917843ac05f43 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 7 Oct 2024 17:59:03 +0000 Subject: [PATCH 2/2] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- .../include/subjugator_build_tools/backward.hpp | 4 ++-- mil_common/ros_alarms/include/ros_alarms/listener.hpp | 7 +++++-- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/SubjuGator/utils/subjugator_build_tools/include/subjugator_build_tools/backward.hpp b/SubjuGator/utils/subjugator_build_tools/include/subjugator_build_tools/backward.hpp index 35f85d221..6424caa79 100644 --- a/SubjuGator/utils/subjugator_build_tools/include/subjugator_build_tools/backward.hpp +++ b/SubjuGator/utils/subjugator_build_tools/include/subjugator_build_tools/backward.hpp @@ -1691,7 +1691,7 @@ class SourceFile for (line_idx = 1; line_idx < line_start; ++line_idx) { getline(*_file, line); - if (not *_file) + if (not*_file) { return lines; } @@ -1712,7 +1712,7 @@ class SourceFile for (; line_idx < line_start + line_count; ++line_idx) { getline(*_file, line); - if (not *_file) + if (not*_file) { return lines; } diff --git a/mil_common/ros_alarms/include/ros_alarms/listener.hpp b/mil_common/ros_alarms/include/ros_alarms/listener.hpp index f5b68e6ae..db7e19213 100644 --- a/mil_common/ros_alarms/include/ros_alarms/listener.hpp +++ b/mil_common/ros_alarms/include/ros_alarms/listener.hpp @@ -320,8 +320,11 @@ class AlarmListener template AlarmListener::AlarmListener(ros::NodeHandle &nh, std::string alarm_name) -try : __nh(nh), __alarm_name(alarm_name), __get_alarm(__nh.serviceClient("/alarm/get")), - __async_spinner(1, &__cb_queue) +try + : __nh(nh) + , __alarm_name(alarm_name) + , __get_alarm(__nh.serviceClient("/alarm/get")) + , __async_spinner(1, &__cb_queue) { std::stringstream obj_name; // For better error msgs