.pre-commit-config.yaml 2.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  1. repos:
  2. - hooks:
  3. - id: commitizen
  4. stages:
  5. - commit-msg
  6. repo: https://github.com/commitizen-tools/commitizen
  7. rev: v2.3.1
  8. - hooks:
  9. - id: gitlint
  10. stages: [commit-msg]
  11. repo: https://github.com/jorisroovers/gitlint
  12. rev: v0.13.1
  13. - repo: https://github.com/pre-commit/pre-commit-hooks
  14. rev: v3.1.0
  15. hooks:
  16. - id: trailing-whitespace
  17. - id: end-of-file-fixer
  18. - id: check-docstring-first
  19. # - id: check-json
  20. - id: check-yaml
  21. - id: debug-statements
  22. # - id: name-test-test
  23. # - id: requirements-txt-fixer
  24. - id: double-quote-string-fixer
  25. - repo: https://gitlab.com/pycqa/flake8
  26. rev: 3.8.3
  27. hooks:
  28. - id: flake8
  29. additional_dependencies: [flake8-typing-imports==1.6.0]
  30. args: [--config, .flake8]
  31. - repo: https://github.com/pre-commit/mirrors-autopep8
  32. rev: v1.5.3
  33. hooks:
  34. - id: autopep8
  35. - repo: https://github.com/asottile/pyupgrade
  36. rev: v2.6.2
  37. hooks:
  38. - id: pyupgrade
  39. args: [--py36-plus]
  40. - repo: https://github.com/asottile/reorder_python_imports
  41. rev: v2.3.0
  42. hooks:
  43. - id: reorder-python-imports
  44. args: [--py3-plus]
  45. - repo: https://github.com/asottile/add-trailing-comma
  46. rev: v2.0.1
  47. hooks:
  48. - id: add-trailing-comma
  49. args: [--py36-plus]
  50. - repo: https://github.com/asottile/setup-cfg-fmt
  51. rev: v1.10.0
  52. hooks:
  53. - id: setup-cfg-fmt
  54. - repo: https://github.com/pre-commit/mirrors-mypy
  55. rev: v0.782
  56. hooks:
  57. - id: mypy
  58. - repo: meta
  59. hooks:
  60. - id: check-hooks-apply
  61. - id: check-useless-excludes
  62. # TALISMAN SECRETS CHECKER TWO OPTIONS - LOCALLY INSTALLED (commenterd) OR AS USUAL
  63. # - repo: local
  64. # hooks:
  65. # - id: talisman-precommit
  66. # name: talisman
  67. # entry: bash -c 'if [ -n "${TALISMAN_HOME:-}" ]; then ${TALISMAN_HOME}/talisman_hook_script pre-commit; else echo "TALISMAN does not exist. Consider installing from https://github.com/thoughtworks/talisman . If you already have talisman installed, please ensure TALISMAN_HOME variable is set to where talisman_hook_script resides, for example, TALISMAN_HOME=${HOME}/.talisman/bin"; fi'
  68. # language: system
  69. # pass_filenames: false
  70. # types: [text]
  71. # verbose: true
  72. - repo: https://github.com/thoughtworks/talisman
  73. rev: '' # Update me!
  74. hooks:
  75. # either `commit` or `push` support
  76. - id: talisman-commit
  77. # - id: talisman-push