Skip to content

Commit

Permalink
Integrate pre-commit tool
Browse files Browse the repository at this point in the history
  • Loading branch information
webknjaz committed Apr 20, 2018
1 parent 51c9fa2 commit 76eb2a6
Show file tree
Hide file tree
Showing 4 changed files with 48 additions and 0 deletions.
25 changes: 25 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
repos:
- repo: git://github.com/pre-commit/pre-commit-hooks
sha: v1.1.1
hooks:
- id: trailing-whitespace
- id: flake8
- id: check-merge-conflict
- id: end-of-file-fixer
- id: name-tests-test
- id: debug-statements
- id: check-added-large-files
- id: check-ast
- id: check-byte-order-marker
- id: check-case-conflict
- id: check-json
- id: pretty-format-json
- id: check-symlinks
- id: check-yaml
- id: detect-private-key
- id: requirements-txt-fixer

- repo: git://github.com/Lucas-C/pre-commit-hooks
sha: v1.1.1
hooks:
- id: remove-tabs
15 changes: 15 additions & 0 deletions .pre-commit-config.yaml.failing
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
repos:
- repo: git://github.com/pre-commit/pre-commit-hooks
sha: v1.1.1
hooks:
- id: double-quote-string-fixer

- repo: git://github.com/chewse/pre-commit-mirrors-pydocstyle
sha: v2.1.1
hooks:
- id: pydocstyle

- repo: git://github.com/ambv/black
sha: 18.4a2
hooks:
- id: black
7 changes: 7 additions & 0 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,13 @@ You may want to perform something like:
$ source venv/bin/activate
$ pip install -r requirements.txt
It is also recommended to make linters run to keep up with coding standards
when you do commits:

.. code-block:: console
$ pre-commit install
Any pull request should include regenerated files, which can be generated by
running:

Expand Down
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
invoke
packaging
pre-commit

0 comments on commit 76eb2a6

Please sign in to comment.