Browse Source

pre-commit: adding pre-commit

master
Marius Isken 4 weeks ago
committed by Gogs
parent
commit
08de34966c
2 changed files with 21 additions and 0 deletions
  1. +11
    -0
      .pre-commit-config.yaml
  2. +10
    -0
      CONTRIBUTING.md

+ 11
- 0
.pre-commit-config.yaml View File

@ -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
- 0
CONTRIBUTING.md View File

@ -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