Skip to content

Commit

Permalink
Add pre-commit configuration (#832)
Browse files Browse the repository at this point in the history
Add pre-commit configuration
  • Loading branch information
mraspaud committed Jun 27, 2019
2 parents b731bf1 + 221b308 commit d801e98
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 0 deletions.
8 changes: 8 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
exclude: '^$'
fail_fast: false
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v2.2.3
hooks:
- id: flake8
additional_dependencies: [flake8-docstrings, flake8-debugger, flake8-bugbear]
11 changes: 11 additions & 0 deletions CONTRIBUTING.rst
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,17 @@ After talking to the Satpy developers any additional work like code or
documentation changes can be provided as a GitHub
`Pull Request <https://help.github.com/articles/creating-a-pull-request/>`_.

To make sure that your code complies with the pytroll python standard, you can
run the `flake8 <http://flake8.pycqa.org/en/latest/>`_ linter on your changes
before you submit them, or even better install a pre-commit hook that runs the
style check for you. To this aim, we provide a configuration file for the
`pre-commit <http://pre-commit.com>`_ tool, that you can install with eg::

pip install pre-commit
pre-commit install

running from your base satpy directory. This will automatically check code style for every commit.

Code of Conduct
===============

Expand Down

0 comments on commit d801e98

Please sign in to comment.