Skip to content
Snippets Groups Projects
Commit 55b01493 authored by Marius Kriegerowski's avatar Marius Kriegerowski Committed by Felix Delattre
Browse files

Added pre-commit hook section in README

parent c1fd14af
Branches
No related tags found
No related merge requests found
Pipeline #17322 passed
......@@ -24,3 +24,25 @@ The CI pipeline is defined in `.gitlab-ci.yml`.
## Code formatting
Run `make check` for checking code format and `make black` for auto-formatting of code.
## Auto-run checks
Add a `pre-commit` hook to git to avoid forgetting style checks before committing to git.
Copy the sample inside the git directory of the project:
```
cp .git/hooks/pre-commit.sample .git/hooks/pre-commit
```
and add the following content:
```
#!/bin/sh
make check
```
If you want to commit without auto-execution of the pre-commit hook do:
```
git commit --no-verify
```
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment