Skip to content

Commit 5a56df3

Browse files
committed
Add pre-commit docs
1 parent bd1c0ff commit 5a56df3

1 file changed

Lines changed: 25 additions & 0 deletions

File tree

developing.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,31 @@ pytest
4141
python -c "import procstar"
4242
```
4343

44+
## Pre-commit Hooks
45+
46+
This project uses pre-commit hooks to automatically format and lint code before commits. The hooks include:
47+
- `ruff format` - Format Python code
48+
- `ruff check` - Lint Python code with auto-fixes
49+
- `cargo fmt` - Format Rust code
50+
- `cargo clippy` - Lint Rust code
51+
52+
### Setup
53+
54+
Pre-commit is already included as a dev dependency. To install the hooks:
55+
56+
```bash
57+
uv run pre-commit install
58+
```
59+
60+
### Manual Run
61+
62+
To run all hooks on all files:
63+
64+
```bash
65+
uv run pre-commit run --all-files
66+
```
67+
68+
The hooks will automatically run before each commit and may modify files to fix formatting or linting issues.
4469

4570
# Packaging
4671

0 commit comments

Comments
 (0)