diff --git a/.github/workflows/clang-format/clang-format.sh b/.github/workflows/clang-format/clang-format.sh index 0b99c629ab..d3ad0be059 100755 --- a/.github/workflows/clang-format/clang-format.sh +++ b/.github/workflows/clang-format/clang-format.sh @@ -7,6 +7,6 @@ else # received no arguments, find files on our own find include/ src/ test/ examples/ \ -regextype egrep \ - -type f -regex '.*\.(hpp|cpp|hpp\.in)$' \ + -type f -regex '.*\.(c|cpp|cxx|h|hpp|tpp)(\.in)?$' \ | xargs clang-format-13 -i fi diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index c36ffc186a..dfb8ca679c 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -68,6 +68,8 @@ repos: rev: v13.0.1 hooks: - id: clang-format + types: [file] + files: '.*\.(c|cpp|cxx|h|hpp|tpp)(\.in)?$' # Autoremoves unused Python imports - repo: https://github.com/hadialqattan/pycln