Skip to content

Commit 5ff624b

Browse files
committed
doc: add README.md
1 parent 49ce550 commit 5ff624b

1 file changed

Lines changed: 40 additions & 0 deletions

File tree

README.md

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
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) |

0 commit comments

Comments
 (0)