Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Integrate pre-commit tool #28

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@pfmoore any suggestion on wording improvements?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, not really. As I said, I'm not convinced we need linter checks on this project, so I'm hardly the one to say how you should word a recommendation that we use them 😄

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