Skip to content

Commit dc69035

Browse files
committed
added note about pre-commit
1 parent 2087cd9 commit dc69035

File tree

1 file changed

+24
-1
lines changed

1 file changed

+24
-1
lines changed

pages/autonomous_software_general/deep_ros_infrastructure.mdx

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,4 +100,27 @@ colcon build
100100

101101
# Source workspace
102102
source install/setup.bash
103-
```
103+
```
104+
105+
### 5. Pre-commit
106+
107+
`deep_ros` uses pre-commit to ensure proper code formatting, linting, and quality checks before commits are made to the repository. This helps maintain consistent code style and catches potential issues early.
108+
109+
To set up pre-commit:
110+
111+
```bash
112+
# Install pre-commit hooks
113+
pre-commit install
114+
115+
# Run pre-commit on all files (optional)
116+
pre-commit run --all-files
117+
```
118+
119+
The pre-commit hooks will automatically run before each commit, checking for:
120+
- Code formatting (black, autopep8)
121+
- Import sorting (isort)
122+
- Linting (flake8, pylint)
123+
- YAML/JSON validation
124+
- Trailing whitespace and line endings
125+
126+
If any checks fail, the commit will be blocked until the issues are resolved.

0 commit comments

Comments
 (0)