.pre-commit-config.yaml 1.3 KB

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