.pre-commit-config.yaml 891 B

123456789101112131415161718192021222324252627282930
  1. # See https://pre-commit.com for more information
  2. # See https://pre-commit.com/hooks.html for more hooks
  3. repos:
  4. - repo: https://github.com/pre-commit/pre-commit-hooks
  5. rev: v3.2.0
  6. hooks:
  7. - id: trailing-whitespace
  8. - repo: local
  9. hooks:
  10. # Run astyle over the staged files with c and h extension found in the directories
  11. # listed in the files regex pattern. Ignoring the files in the exclude pattern.
  12. - id: format-source
  13. name: Formatting source files
  14. entry: astyle --options=scripts/code-format.cfg --ignore-exclude-errors
  15. stages: [ commit ]
  16. language: system
  17. pass_filenames: true
  18. verbose: true
  19. files: |
  20. (?x)^(
  21. src/ |
  22. tests/src/test_cases/
  23. )
  24. exclude: |
  25. (?x)^(
  26. src/extra/libs/ |
  27. src/lv_conf_internal.h
  28. )
  29. types_or: ["c", "header"]