Skip to content

Conversation

@kluge7
Copy link
Contributor

@kluge7 kluge7 commented Sep 15, 2025

This PR adds ROS 2 pre-commit hooks for C++ (cppcheck, cpplint) and CMake (ament_lint_cmake), along with a GitHub Actions workflow to run them since they are not supported by pre-commit ci

Remaining work: Fix the issues flagged by the new hooks.

@codecov
Copy link

codecov bot commented Sep 15, 2025

Codecov Report

❌ Patch coverage is 0% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 0.00%. Comparing base (02ec978) to head (1b00b0c).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
...ring/include/image_filters/image_filtering_ros.hpp 0.00% 1 Missing ⚠️
Additional details and impacted files
@@          Coverage Diff          @@
##            main      #8   +/-   ##
=====================================
  Coverage   0.00%   0.00%           
=====================================
  Files          3       3           
  Lines        254     234   -20     
  Branches      18      18           
=====================================
+ Misses       254     234   -20     
Flag Coverage Δ
unittests 0.00% <0.00%> (ø)

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

Files with missing lines Coverage Δ
image-filtering/src/image_filtering_ros.cpp 0.00% <ø> (ø)
...ring/include/image_filters/image_filtering_ros.hpp 0.00% <0.00%> (ø)

... and 1 file with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@kluge7 kluge7 requested a review from Copilot November 3, 2025 20:22
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR improves code quality and CI configuration by standardizing header guards to follow ROS2 conventions, fixing code style issues, and adding pre-commit hooks for automated linting.

  • Updated header guards to use the ROS2 naming convention with double underscores and trailing underscores
  • Fixed minor code style issues (empty destructor braces, static const ordering, include statements)
  • Added pre-commit configuration with ament linters and GitHub workflow integration

Reviewed Changes

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

Show a summary per file
File Description
image-filtering/include/image_filters/image_processing.hpp Updated header guards to ROS2 convention, added <string> include, reordered static const keywords
image-filtering/include/image_filters/image_filtering_ros.hpp Updated header guards to ROS2 convention, added <memory> and <string> includes, fixed empty destructor braces
image-filtering/src/image_filtering_ros.cpp Removed unnecessary blank line
.pre-commit-config-local.yaml Added local pre-commit configuration with ament linters for C++ and CMake
.github/workflows/pre-commit.yml Added GitHub workflow for automated pre-commit checks

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

@kluge7 kluge7 merged commit 52b90b0 into main Nov 3, 2025
6 checks passed
@kluge7 kluge7 deleted the ci/add-pre-commit-for-cpp-and-cmake branch November 3, 2025 20:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants