Browse Source

pre-commit: adding pre-commit

pile_jump
Marius Isken 3 months ago
committed by Gogs
parent
commit
08de34966c
  1. 11
      .pre-commit-config.yaml
  2. 10
      CONTRIBUTING.md

11
.pre-commit-config.yaml

@ -0,0 +1,11 @@
fail_fast: true
files: ^(src|test)/
repos:
- repo: local
hooks:
- id: flake8
name: flake8
entry: flake8
language: system
files: ^src/
types: [python]

10
CONTRIBUTING.md

@ -146,6 +146,16 @@ Additionally,
- Docs are built with Sphinx, use rst syntax.
- Follow the usual convention 1 line summary, blank line, description.
### Use pre-commit
The repository comes with a [pre-commit](https://pre-commit.com/) config to
check the code with flake8 before commiting.
Install the git-hook with:
```sh
pre-commit install
```
## Documentation
Pyrocko's documentation is built using the `Sphinx` tool. See the `docs`

Loading…
Cancel
Save