.pre-commit-config.yaml 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. - repo: https://github.com/PaddlePaddle/mirrors-yapf.git
  2. sha: 0d79c0c469bab64f7229c9aca2b1186ef47f0e37
  3. hooks:
  4. - id: yapf
  5. files: \.py$
  6. - repo: https://github.com/pre-commit/pre-commit-hooks
  7. sha: a11d9314b22d8f8c7556443875b731ef05965464
  8. hooks:
  9. - id: check-merge-conflict
  10. - id: check-symlinks
  11. - id: detect-private-key
  12. files: (?!.*paddle)^.*$
  13. - id: end-of-file-fixer
  14. files: \.(md|yml)$
  15. - id: trailing-whitespace
  16. files: \.(md|yml)$
  17. - repo: https://github.com/Lucas-C/pre-commit-hooks
  18. sha: v1.0.1
  19. hooks:
  20. - id: forbid-crlf
  21. files: \.(md|yml)$
  22. - id: remove-crlf
  23. files: \.(md|yml)$
  24. - id: forbid-tabs
  25. files: \.(md|yml)$
  26. - id: remove-tabs
  27. files: \.(md|yml)$
  28. - repo: local
  29. hooks:
  30. - id: clang-format-with-version-check
  31. name: clang-format
  32. description: Format files with ClangFormat.
  33. entry: bash ./.travis/codestyle/clang_format.hook -i
  34. language: system
  35. files: \.(c|cc|cxx|cpp|cu|h|hpp|hxx|proto)$
  36. - repo: local
  37. hooks:
  38. - id: cpplint-cpp-source
  39. name: cpplint
  40. description: Check C++ code style using cpplint.py.
  41. entry: bash ./.travis/codestyle/cpplint_pre_commit.hook
  42. language: system
  43. files: \.(c|cc|cxx|cpp|cu|h|hpp|hxx)$