Skip to content

Latest commit

 

History

History
40 lines (28 loc) · 1.28 KB

README.md

File metadata and controls

40 lines (28 loc) · 1.28 KB

ROS 2 Pre-commit

Here are some out of the box pre-commit hooks focused on ROS 2 workspaces.

Example:

  - repo: https://github.com/minipada/ros2_pre-commit.git
    rev: main
    hooks:
      - id: ros2_ws_same_versions
        args: [--src=., --regex=dc_.*]
      - id: ros2_ws_set_metadata
        args: [--src=., --regex=dc_.*]

Same version

Ensure all packages in the workspace are of the same version. This is needed for bloom releases.

ros2_ws_same_versions

Parameters:

Parameter name Description Default value
src Define the source of the files to inspect None (required)
regex Packages inspected will match this regex None (Optional)

Metadata set

Ensure all metadata is set in package.xml: author, license and description.

ros2_ws_set_metadata

Parameters:

Parameter name Description Default value
src Define the source of the files to inspect None (required)
regex Packages inspected will match this regex None (Optional)