Skip to content

Add C++ and CMake pre-commit hooks#568

Merged
kluge7 merged 18 commits into
mainfrom
ci/add-cpp-pre-commit
Nov 12, 2025
Merged

Add C++ and CMake pre-commit hooks#568
kluge7 merged 18 commits into
mainfrom
ci/add-cpp-pre-commit

Conversation

@kluge7

@kluge7 kluge7 commented Apr 6, 2025

Copy link
Copy Markdown
Contributor

No description provided.

@kluge7

kluge7 commented Apr 6, 2025

Copy link
Copy Markdown
Contributor Author

Need to remove vortex-auv from here before merging: https://github.com/organizations/vortexntnu/settings/installations/57321089

@kluge7 kluge7 changed the title Add cpp and CMake pre commit hooks Add C++ and CMake pre-commit hooks Apr 6, 2025
@codecov

codecov Bot commented Apr 6, 2025

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 0% with 7 lines in your changes missing coverage. Please review.
✅ Project coverage is 24.01%. Comparing base (38af952) to head (c6915a7).

Files with missing lines Patch % Lines
mission/FSM/docking/src/docking.cpp 0.00% 5 Missing ⚠️
...lude/ekf_pose_filtering/ekf_pose_filtering_ros.hpp 0.00% 1 Missing ⚠️
...lude/pose_action_server/pose_action_server_ros.hpp 0.00% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main     #568   +/-   ##
=======================================
  Coverage   24.01%   24.01%           
=======================================
  Files          38       38           
  Lines        2286     2286           
  Branches      612      612           
=======================================
  Hits          549      549           
  Misses       1588     1588           
  Partials      149      149           
Flag Coverage Δ
unittests 24.01% <0.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
...s_controller/src/dp_adapt_backs_controller_ros.cpp 0.81% <ø> (ø)
...ntroller_dp/include/pid_controller_dp/typedefs.hpp 0.00% <ø> (ø)
...euler/include/pid_controller_dp_euler/typedefs.hpp 0.00% <ø> (ø)
...los_guidance/include/los_guidance/los_guidance.hpp 100.00% <ø> (ø)
...lude/thrust_allocator_auv/thrust_allocator_ros.hpp 0.00% <ø> (ø)
...de/thrust_allocator_auv/thrust_allocator_utils.hpp 0.00% <ø> (ø)
...er_interface_auv/thruster_interface_auv_driver.hpp 0.00% <ø> (ø)
...uster_interface_auv/thruster_interface_auv_ros.hpp 0.00% <ø> (ø)
...nterface_auv/src/thruster_interface_auv_driver.cpp 0.00% <ø> (ø)
...lude/ekf_pose_filtering/ekf_pose_filtering_ros.hpp 0.00% <0.00%> (ø)
... and 2 more
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@kluge7 kluge7 force-pushed the ci/add-cpp-pre-commit branch 3 times, most recently from 6feccc6 to f815477 Compare April 9, 2025 18:05
@kluge7

kluge7 commented Apr 9, 2025

Copy link
Copy Markdown
Contributor Author

Need to remove vortex-auv from here before merging: https://github.com/organizations/vortexntnu/settings/installations/57321089

Don't need to do this, made a separate config file for the local pre-commit hooks. To run locally:

pre-commit run --all-files -c .pre-commit-config-local.yaml

Could also be an idea to make a script which runs both

@kluge7 kluge7 force-pushed the ci/add-cpp-pre-commit branch from e44d1b0 to f394a99 Compare April 9, 2025 20:37
@kluge7 kluge7 requested a review from Copilot April 10, 2025 08:06

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

@kluge7 kluge7 force-pushed the ci/add-cpp-pre-commit branch from 6c060f2 to afd6e40 Compare April 25, 2025 09:27
@kluge7 kluge7 force-pushed the ci/add-cpp-pre-commit branch from 7058487 to 4e1e52b Compare November 12, 2025 20:59
@kluge7 kluge7 force-pushed the ci/add-cpp-pre-commit branch from f128a79 to 53ad5fe Compare November 12, 2025 23:00
@kluge7 kluge7 requested a review from Copilot November 12, 2025 23:10

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

Copilot reviewed 32 out of 32 changed files in this pull request and generated no new comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@kluge7 kluge7 merged commit 9e123f5 into main Nov 12, 2025
6 of 7 checks passed
@kluge7 kluge7 deleted the ci/add-cpp-pre-commit branch November 12, 2025 23:43
anbit-adhi pushed a commit that referenced this pull request Jan 6, 2026
* ci(pre-commit): add CI workflow for checking pre-commit hooks

* ci(pre-commit): add hooks for cpp and CMake

* refactor(pre-commit.yml): now uses the workflow on main

* docs(README.md): update status badge for pre-commit

* refactor(ci): move local hooks into a different config file

* docs(README.md): update status badge for pre-commit

* refactor(ci): pre-commit.yml now only runs on pull_request and workflow_dispatch

* ci(pre-commit-local): ignore build/include_order in ament_cpplint since conflict with clang-format

* refactor: fix ament_cpplint and cppcheck warnings

* ci(pre-commit-config-local): increase line length to 120 for ament_cpplint due to some lines being longer

* refactor: fix ament_cpplint and cppcheck warnings

* chore(pre-commit): exclude test dirs from ament_cppcheck to avoid false positives

* ci(pre-commit): update workflow to run on push to main and pull_request
CurryMonsters pushed a commit that referenced this pull request Jan 23, 2026
* ci(pre-commit): add CI workflow for checking pre-commit hooks

* ci(pre-commit): add hooks for cpp and CMake

* refactor(pre-commit.yml): now uses the workflow on main

* docs(README.md): update status badge for pre-commit

* refactor(ci): move local hooks into a different config file

* docs(README.md): update status badge for pre-commit

* refactor(ci): pre-commit.yml now only runs on pull_request and workflow_dispatch

* ci(pre-commit-local): ignore build/include_order in ament_cpplint since conflict with clang-format

* refactor: fix ament_cpplint and cppcheck warnings

* ci(pre-commit-config-local): increase line length to 120 for ament_cpplint due to some lines being longer

* refactor: fix ament_cpplint and cppcheck warnings

* chore(pre-commit): exclude test dirs from ament_cppcheck to avoid false positives

* ci(pre-commit): update workflow to run on push to main and pull_request
@github-actions

Copy link
Copy Markdown

🎉 This PR is included in version 2.6.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants