.pre-commit-config.yaml 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  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: end-of-file-fixer
  12. - id: trailing-whitespace
  13. - id: detect-private-key
  14. - id: check-symlinks
  15. - id: check-added-large-files
  16. - repo: local
  17. hooks:
  18. - id: copyright_checker
  19. name: copyright_checker
  20. entry: python ./.copyright.hook
  21. language: system
  22. files: \.(c|cc|cxx|cpp|cu|h|hpp|hxx|proto|py)$
  23. exclude: (?!.*third_party)^.*$
  24. - repo: local
  25. hooks:
  26. - id: clang-format-with-version-check
  27. name: clang-format
  28. description: Format files with ClangFormat.
  29. entry: bash ./tools/codestyle/clang_format.hook -i
  30. language: system
  31. files: \.(c|cc|cxx|cpp|cu|h|hpp|hxx|proto)$
  32. - repo: local
  33. hooks:
  34. - id: cpplint-cpp-source
  35. name: cpplint
  36. description: Check C++ code style using cpplint.py.
  37. entry: bash ./tools/codestyle/cpplint_pre_commit.hook
  38. language: system
  39. files: \.(c|cc|cxx|cpp|cu|h|hpp|hxx)$