.pre-commit-config.yaml 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  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. hooks:
  25. - id: clang-format-with-version-check
  26. name: clang-format
  27. description: Format files with ClangFormat.
  28. entry: bash ./tools/codestyle/clang_format.hook -i
  29. language: system
  30. files: \.(c|cc|cxx|cpp|cu|h|hpp|hxx|proto)$
  31. hooks:
  32. - id: cpplint-cpp-source
  33. name: cpplint
  34. description: Check C++ code style using cpplint.py.
  35. entry: bash cpplint_pre_commit.hook
  36. language: system
  37. files: \.(c|cc|cxx|cpp|cu|h|hpp|hxx)$