File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ # ROS2 Pre-commit
2+
3+ Here are some out of the box [ pre-commit] ( https://pre-commit.com/ ) hooks focused on ROS2 workspaces.
4+
5+ Example:
6+
7+ ``` yaml
8+ - repo : https://github.com/minipada/ros2_pre-commit.git
9+ rev : main
10+ hooks :
11+ - id : ros2_ws_same_versions
12+ args : [--src=., --regex=dc_.*]
13+ - id : ros2_ws_set_metadata
14+ args : [--src=., --regex=dc_.*]
15+
16+ ```
17+
18+ ## Same version
19+ Ensure all packages in the workspace are of the same version. This is needed for bloom releases.
20+
21+ ` ros2_ws_same_versions `
22+
23+ Parameters:
24+
25+ | Parameter name | Description | Default value |
26+ | -------------- | ----------------------------------------- | --------------- |
27+ | src | Define the source of the files to inspect | None (required) |
28+ | regex | Packages inspected will match this regex | None (Optional) |
29+
30+ ## Metadata set
31+ Ensure all metadata is set in package.xml: author, license and description.
32+
33+ ` ros2_ws_set_metadata `
34+
35+ Parameters:
36+
37+ | Parameter name | Description | Default value |
38+ | -------------- | ----------------------------------------- | --------------- |
39+ | src | Define the source of the files to inspect | None (required) |
40+ | regex | Packages inspected will match this regex | None (Optional) |
You can’t perform that action at this time.
0 commit comments