.pre-commit-config.yaml 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. default_language_version:
  2. python: python3
  3. exclude: |
  4. (?x)^(
  5. gdextension/extension_api\.json|
  6. gdextension/gdextension_interface\.h
  7. )$
  8. repos:
  9. - repo: https://github.com/pre-commit/mirrors-clang-format
  10. rev: v17.0.6
  11. hooks:
  12. - id: clang-format
  13. - repo: https://github.com/astral-sh/ruff-pre-commit
  14. rev: v0.4.4
  15. hooks:
  16. - id: ruff
  17. args: [--fix]
  18. - id: ruff-format
  19. - repo: https://github.com/pre-commit/mirrors-mypy
  20. rev: v0.971
  21. hooks:
  22. - id: mypy
  23. files: \.py$
  24. types_or: [text]
  25. - repo: https://github.com/codespell-project/codespell
  26. rev: v2.3.0
  27. hooks:
  28. - id: codespell
  29. additional_dependencies: [tomli]
  30. - repo: local
  31. hooks:
  32. - id: copyright-headers
  33. name: copyright-headers
  34. language: python
  35. entry: python misc/scripts/copyright_headers.py
  36. files: \.(c|h)pp$
  37. exclude: ^test/
  38. - id: header-guards
  39. name: header-guards
  40. language: python
  41. entry: python misc/scripts/header_guards.py
  42. files: \.hpp$
  43. exclude: ^test/
  44. - id: file-format
  45. name: file-format
  46. language: python
  47. entry: python misc/scripts/file_format.py
  48. types_or: [text]
  49. - id: check-get-file-list
  50. name: check-get-file-list
  51. language: python
  52. entry: python misc/scripts/check_get_file_list.py
  53. pass_filenames: false
  54. always_run: true
  55. stages: [manual]