2017-11-21 15:35:51 +00:00
|
|
|
repos:
|
2018-08-13 17:57:07 +00:00
|
|
|
- repo: https://github.com/pre-commit/pre-commit-hooks
|
2018-12-28 02:27:56 +00:00
|
|
|
rev: v2.1.0
|
2017-11-21 15:35:51 +00:00
|
|
|
hooks:
|
|
|
|
- id: trailing-whitespace
|
|
|
|
- id: end-of-file-fixer
|
|
|
|
- id: mixed-line-ending
|
|
|
|
- id: double-quote-string-fixer
|
2018-12-28 02:27:56 +00:00
|
|
|
# This stopped working so comment out for now (started applying to files that didn't need it):
|
|
|
|
# - id: fix-encoding-pragma
|
2017-11-21 15:35:51 +00:00
|
|
|
- id: check-yaml
|
2018-08-13 17:57:07 +00:00
|
|
|
# Keep in sync with flake8 version in setup.py and .travis.yml --
|
|
|
|
# check https://github.com/pre-commit/pre-commit-hooks/blob/master/setup.py
|
|
|
|
# for the version of flake8 that is included with this pre-commit repo.
|
2017-11-21 15:35:51 +00:00
|
|
|
- id: flake8
|
|
|
|
exclude: docs/conf.py
|
2015-12-21 03:05:20 +00:00
|
|
|
|
2018-08-13 17:57:07 +00:00
|
|
|
- repo: https://github.com/chewse/pre-commit-mirrors-pydocstyle
|
|
|
|
# Keep in sync with pydocstyle version in setup.py and .travis.yml
|
|
|
|
rev: v2.1.1
|
2017-11-21 15:35:51 +00:00
|
|
|
hooks:
|
|
|
|
- id: pydocstyle
|
2018-03-01 03:18:39 +00:00
|
|
|
exclude: bidict/_version.py
|
2017-11-21 15:35:51 +00:00
|
|
|
|
2018-08-13 17:57:07 +00:00
|
|
|
- repo: https://github.com/Lucas-C/pre-commit-hooks
|
2018-12-28 02:27:56 +00:00
|
|
|
rev: v1.1.6
|
2017-11-21 15:35:51 +00:00
|
|
|
hooks:
|
|
|
|
- id: forbid-crlf
|
|
|
|
- id: remove-crlf
|
|
|
|
- id: forbid-tabs
|
|
|
|
- id: remove-tabs
|
2018-12-28 02:27:56 +00:00
|
|
|
# This stopped working so comment out for now (started applying to files that didn't need it):
|
|
|
|
# - id: insert-license
|
|
|
|
# files: \.py$
|
|
|
|
# args:
|
|
|
|
# # Renamed LICENSE_HEADER -> .LICENSE_HEADER to avoid confusing licensee
|
|
|
|
# # (https://github.com/benbalter/licensee - what GitHub uses to detect license)
|
|
|
|
# - --license-filepath=.LICENSE_HEADER
|
2017-11-21 15:35:51 +00:00
|
|
|
|
2018-08-13 17:57:07 +00:00
|
|
|
- repo: https://github.com/pre-commit/mirrors-pylint
|
|
|
|
# Keep in sync with pylint version in setup.py and .travis.yml
|
2018-12-28 02:27:56 +00:00
|
|
|
rev: v2.2.2
|
2018-04-07 05:22:36 +00:00
|
|
|
hooks:
|
|
|
|
- id: pylint
|
2018-08-13 17:57:07 +00:00
|
|
|
# Needed to avoid ImportErrors when linting tests (keep in sync with versions in setup.py):
|
2018-12-28 02:27:56 +00:00
|
|
|
additional_dependencies: ["hypothesis<4","pytest<5", "sphinx<2"]
|
2018-04-07 05:22:36 +00:00
|
|
|
args:
|
|
|
|
# http://pylint.pycqa.org/en/latest/user_guide/run.html#parallel-execution
|
|
|
|
# > If the provided number is 0, then the total number of CPUs will be used.
|
|
|
|
- --jobs=0
|
2018-12-28 02:27:56 +00:00
|
|
|
|
|
|
|
- repo: https://github.com/jumanjihouse/pre-commit-hooks
|
|
|
|
rev: 1.10.2
|
|
|
|
hooks:
|
|
|
|
- id: shellcheck
|
|
|
|
- id: shfmt
|