# Check the usage of pre-commit on https://pre-commit.com/
repos:
  - repo: https://github.com/pre-commit/pre-commit-hooks
    rev: v4.3.0
    hooks:
      - id: trailing-whitespace
      - id: end-of-file-fixer

  - repo: https://github.com/pocc/pre-commit-hooks
    rev: v1.3.5
    hooks:
      - id: clang-format
        args:
          - -i
          - --style=file
          - --fallback-style=none
        files: |
          (?x)^(
            .*?\.cpp|
            .*?\.c|
            .*?\.h
          )

exclude: |
  (?x)^(
    .*?_i\.h|
    .*?_p\.c|
    .*?\.md
  )
