.pre-commit-config.yaml 1.83 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
  rev: v2.1.0
  hooks:
  - id: trailing-whitespace
  - id: end-of-file-fixer
  - id: mixed-line-ending
  - id: double-quote-string-fixer
  # This stopped working so comment out for now (started applying to files that didn't need it):
  # - id: fix-encoding-pragma
  - id: check-yaml
12
  # Keep in sync with flake8 version in setup.py --
13 14 15 16 17
  # 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.
  - id: flake8

- repo: https://github.com/chewse/pre-commit-mirrors-pydocstyle
18
  # Keep in sync with pydocstyle version in setup.py
19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39
  rev: v2.1.1
  hooks:
  - id: pydocstyle
    exclude: bidict/_version.py

- repo: https://github.com/Lucas-C/pre-commit-hooks
  rev: v1.1.6
  hooks:
  - id: forbid-crlf
  - id: remove-crlf
  - id: forbid-tabs
  - id: remove-tabs
  # 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

- repo: https://github.com/pre-commit/mirrors-pylint
40
  # Keep in sync with pylint version in setup.py
41 42 43 44
  rev: v2.2.2
  hooks:
  - id: pylint
    # Needed to avoid ImportErrors when linting tests (keep in sync with versions in setup.py):
45
    additional_dependencies: ["hypothesis<4","pytest<5", "Sphinx<2"]
46 47
    args:
    # http://pylint.pycqa.org/en/latest/user_guide/run.html#parallel-execution
48
    # "If the provided number is 0, then the total number of CPUs will be used."
49 50 51 52 53 54 55
    - --jobs=0

- repo: https://github.com/jumanjihouse/pre-commit-hooks
  rev: 1.10.2
  hooks:
  - id: shellcheck
  - id: shfmt