Jelajahi Sumber

Add clang-format to lefthook

DarthSim 1 tahun lalu
induk
melakukan
06cd9413c6
1 mengubah file dengan 4 tambahan dan 0 penghapusan
  1. 4 0
      lefthook.yml

+ 4 - 0
lefthook.yml

@@ -2,6 +2,10 @@ pre-commit:
   scripts:
     lint:
       tags: lint
+  commands:
+    lint-clang:
+      tags: lint
+      run: command -v clang-format && find . -not -path "./.tmp/*" -not -path "./.git/*" \( -iname "*.h" -o -iname "*.c" -o -iname "*.cpp" \) | xargs clang-format --dry-run --Werror
 
 pre-push:
   scripts: