diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 49cf98e..4b8a06b 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,13 +1,11 @@ -# See https://pre-commit.com for more information -# See https://pre-commit.com/hooks.html for more hooks repos: -- repo: https://github.com/pre-commit/pre-commit-hooks - rev: v3.2.0 - hooks: - - id: trailing-whitespace - - id: end-of-file-fixer - - id: check-yaml - - id: check-added-large-files +- repo: https://github.com/pre-commit/pre-commit-hooks + rev: v3.2.0 + hooks: + - id: trailing-whitespace + id: end-of-file-fixer + id: check-yaml + id: check-added-large-files # CMake formatting - repo: https://github.com/cheshirekow/cmake-format-precommit @@ -17,3 +15,10 @@ repos: additional_dependencies: [pyyaml] types: [file] files: (\.cmake|CMakeLists.txt)(.in)?$ + +# Clang format the codebase automatically +- repo: https://github.com/pre-commit/mirrors-clang-format + rev: "v13.0.1" + hooks: + - id: clang-format + types_or: [c++, c]