Skip to content

Commit 1318808

Browse files
adding instructions to the contribution file
1 parent 0409f87 commit 1318808

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed

CONTRIBUTING.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,31 @@ CRUDAdmin uses pytest for testing. Run tests using:
4949
uv run pytest
5050
```
5151

52+
### Pre-commit Hooks
53+
CRUDAdmin uses pre-commit to automatically check code quality before each commit. It helps enforce
54+
linting, formatting, and type checking.
55+
56+
After installing the development dependencies:
57+
58+
```sh
59+
uv run pre-commit install
60+
```
61+
62+
This will set up thee Git hooks to run automatically before every commit.
63+
64+
*Running hooks Manually*
65+
To run all hooks on all files:
66+
```sh
67+
uv run pre-commit run --all-files
68+
```
69+
70+
This will run:
71+
- `ruff` fot linting and formatting
72+
- `mypy` for type checking
73+
- basic formatting checks (trailing whitespace, EOF, file size)
74+
75+
Make sure all pre-commit checks pass before submitting a PR.
76+
5277
### Linting
5378
Use mypy for type checking:
5479
```sh

0 commit comments

Comments
 (0)