You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+20-5Lines changed: 20 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -10,10 +10,11 @@ These tutorials use the [reStructuredText](http://www.sphinx-doc.org/en/stable/r
10
10
11
11
All content in this repository is open source and released under the [BSD License v3](https://opensource.org/licenses/BSD-3-Clause). Each individual source code file should contain a copy of the license.
12
12
13
-
This repository is currently built automatically by two systems. Travis builds the documentation for Melodic and ROS Build Farm builds the documentation for older versions:
This repository is currently built automatically by two systems. Github Actions builds the documentation for Noetic, and ROS Build Farm builds the documentation for older versions:
@@ -48,7 +49,7 @@ We rely on the community to keep these tutorials up to date and bug free. If you
48
49
49
50
**Code Formatting**
50
51
51
-
* These tutorials use the same [style guidelines](http://moveit.ros.org/documentation/contributing/code/) as the MoveIt project. When modifying or adding to these tutorials, it is required that code is auto formatted using [clang-format](http://moveit.ros.org/documentation/contributing/code/).
52
+
* These tutorials use the same [style guidelines](http://moveit.ros.org/documentation/contributing/code/) as the MoveIt project. When modifying or adding to these tutorials, it is required that code is auto formatted using [clang-format](http://moveit.ros.org/documentation/contributing/code/). To check and apply our style guidelines we use [pre-commit](https://pre-commit.com/).
52
53
* Tutorials should exemplify best coding practices. If a contribution wouldn't pass review in the MoveIt project, then it shouldn't pass review in the tutorials.
53
54
* Relevant code should be included and explained using the ``.. tutorial-formatter::`` tag.
54
55
* Irrelevant code should be excluded from the generated html using the ``BEGIN_TUTORIAL``, ``END_TUTORIAL``, ``BEGIN_SUB_TUTORIAL``, and ``END_SUB_TUTORIAL`` tags.
@@ -62,6 +63,20 @@ We rely on the community to keep these tutorials up to date and bug free. If you
62
63
* Tutorials should flow from show to tell with videos and demos at the beginning followed by explanations.
63
64
* New tutorials should match the formatting, style and flow of existing tutorials whenever possible.
64
65
66
+
**pre-commit**
67
+
68
+
pre-commit is a tool that is used in ``moveit_tutorials`` to check and apply style guidelines automatically. To install pre-commit into your system:
69
+
70
+
pip3 install pre-commit
71
+
72
+
In you catkin workspace, under ``moveit_tutorials`` directory you can install the git hooks like this:
73
+
74
+
cd $CATKIN_WS/src/moveit_tutorials && pre-commit install
75
+
76
+
With this pre-commit will automatically run and check a list of styling including clang-format, end of files and trailing whitespaces whenever you run ``git commit``. To run pre-commit any time other than ``git commit`` you can use the following command:
77
+
78
+
cd $CATKIN_WS/src/moveit_tutorials && pre-commit run -a
79
+
65
80
### Directory Structure
66
81
67
82
* Each tutorial should live in its own subdirectory within the `./doc/ <>` directory.
0 commit comments