.pre-commit-config.yaml 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  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: https://github.com/BlankSpruce/gersemi
  31. rev: 0.18.2
  32. hooks:
  33. - id: gersemi
  34. args: ["-i", "--no-warn-about-unknown-commands", "-l", "120"]
  35. - repo: local
  36. hooks:
  37. - id: copyright-headers
  38. name: copyright-headers
  39. language: python
  40. entry: python misc/scripts/copyright_headers.py
  41. files: \.(c|h)pp$
  42. exclude: ^test/
  43. - id: header-guards
  44. name: header-guards
  45. language: python
  46. entry: python misc/scripts/header_guards.py
  47. files: \.hpp$
  48. exclude: ^test/
  49. - id: file-format
  50. name: file-format
  51. language: python
  52. entry: python misc/scripts/file_format.py
  53. types_or: [text]
  54. - id: check-get-file-list
  55. name: check-get-file-list
  56. language: python
  57. entry: python misc/scripts/check_get_file_list.py
  58. pass_filenames: false
  59. always_run: true
  60. stages: [manual]