From 67c749da342eca4fe6733e3668bbeb50676e6922 Mon Sep 17 00:00:00 2001
From: soblin <hilo.soblin@gmail.com>
Date: Mon, 14 Mar 2022 07:57:34 +0900
Subject: [PATCH] added clang-format checking in pre-commit

---
 .pre-commit-config.yaml | 23 ++++++++++++++---------
 1 file changed, 14 insertions(+), 9 deletions(-)

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]
-- 
GitLab