ros-tooling / action-ros-lint

Github action to run linters on ROS 2 packages
Apache License 2.0
19 stars 7 forks source link

Add support to `ament_clang_tidy` #392

Closed caioaamaral closed 1 month ago

caioaamaral commented 1 month ago

Description

Would be good having support for ament_clang_tidy to enforce ros2 c/cpp code style

Related Issues

N/A

Completion Criteria

Implementation Notes / Suggestions

requires an update in https://github.com/ros-tooling/action-ros-lint/blob/0bab0b843f8e38cb399e43bb77c6b6fbf49281dc/src/action-ros-lint.ts#L53 to handle ament_clang_tidy params

christophebedard commented 1 month ago

I haven't tried it, but I believe you should be able to use ament_clang_tidy. You should be able to use the arguments input to provide parameters for the ament_* linter: https://github.com/ros-tooling/action-ros-lint/blob/0bab0b843f8e38cb399e43bb77c6b6fbf49281dc/action.yml#L12-L14 It's added to the command here: https://github.com/ros-tooling/action-ros-lint/blob/0bab0b843f8e38cb399e43bb77c6b6fbf49281dc/src/action-ros-lint.ts#L60

I found an example with linter: clang-tidy in the wild: https://github.com/gavanderhoorn/qml_ros2_plugin/blob/7f445a949e9fe1051450f2fea60204a71f32a430/.github/workflows/ci.yml#L53.

caioaamaral commented 1 month ago

indeed! Sorry for the noise