Skip to content

Commit

Permalink
Added Pre commit hook (#161)
Browse files Browse the repository at this point in the history
* added precommit hook

* add git hook to contribution

* changed .yaml
  • Loading branch information
mk2510 committed Sep 8, 2020
1 parent 55e7a2d commit 3b36bac
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 0 deletions.
6 changes: 6 additions & 0 deletions .pre-commit-config.yaml
@@ -0,0 +1,6 @@
repos:
- repo: https://github.com/ambv/black
rev: stable
hooks:
- id: black
language_version: python3
2 changes: 2 additions & 0 deletions CONTRIBUTING.md
Expand Up @@ -178,6 +178,8 @@ pip install -e '.[dev]'

- Some of the [dev-dependencies](https://github.com/jbesomi/texthero/blob/6e6b8f70432979a81a09d48826fc907adc67cba7/setup.cfg#L43) will be used by any contributor of TextHero to execute the [tests.sh](./scripts/tests.sh) locally.

- execute `pre-commit install` inside your project folder in order to enable git pre commit hook. This will format your code automatically before staging them

## **IMPORTANT NOTE**

- Some of the [dev-dependencies](https://github.com/jbesomi/texthero/blob/6e6b8f70432979a81a09d48826fc907adc67cba7/setup.cfg#L43) are necessary **IF** the contributor wants to update the website or run the website locally but please remember that one **shouldn't be sending these kind of changes as a Pull Request**.
Expand Down
1 change: 1 addition & 0 deletions setup.cfg
Expand Up @@ -49,3 +49,4 @@ dev =
nbsphinx
parameterized>=0.7.4
coverage
pre-commit

0 comments on commit 3b36bac

Please sign in to comment.