.pre-commit-config.yaml 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. repos:
  2. - repo: https://github.com/pre-commit/mirrors-clang-format
  3. rev: v17.0.6
  4. hooks:
  5. - id: clang-format
  6. files: \.(c|h|cpp|hpp|cc|cxx|m|mm|inc|java|glsl)$
  7. types_or: [text]
  8. exclude: |
  9. (?x)^(
  10. tests/python_build.*|
  11. .*thirdparty.*|
  12. .*platform/android/java/lib/src/com.*|
  13. .*-so_wrap.*
  14. )
  15. - repo: https://github.com/psf/black-pre-commit-mirror
  16. rev: 24.2.0
  17. hooks:
  18. - id: black
  19. files: (\.py$|SConstruct|SCsub)
  20. types_or: [text]
  21. exclude: .*thirdparty.*
  22. args:
  23. - --line-length=120
  24. - repo: local
  25. hooks:
  26. - id: make-rst
  27. name: make-rst
  28. entry: python3 doc/tools/make_rst.py doc/classes modules platform --dry-run --color
  29. pass_filenames: false
  30. language: python
  31. files: ^(doc|modules|platform).*xml$
  32. - id: copyright-headers
  33. name: copyright-headers
  34. language: python
  35. files: \.(c|h|cpp|hpp|cc|cxx|m|mm|inc|java)$
  36. entry: python3 misc/scripts/copyright_headers.py
  37. exclude: |
  38. (?x)^(
  39. .*thirdparty.*|
  40. .*-so_wrap.*|
  41. core/math/bvh_.*\.inc$|
  42. platform/android/java/lib/src/com.*|
  43. platform/android/java/lib/src/org/godotengine/godot/gl/GLSurfaceView.*|
  44. platform/android/java/lib/src/org/godotengine/godot/gl/EGLLogWrapper.*|
  45. platform/android/java/lib/src/org/godotengine/godot/utils/ProcessPhoenix.*
  46. )
  47. - id: dotnet-format
  48. name: dotnet-format
  49. language: python
  50. entry: python3 misc/scripts/dotnet_format.py
  51. types_or: [c#]