From 129c6c2badbabce1e3df21eea43e5f1febf17851 Mon Sep 17 00:00:00 2001 From: Matej Focko Date: Wed, 21 Feb 2024 23:33:42 +0100 Subject: [PATCH] feat: add clang-format hook Signed-off-by: Matej Focko --- .pre-commit-hooks.yaml | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/.pre-commit-hooks.yaml b/.pre-commit-hooks.yaml index 3abcfe7..ce472d9 100644 --- a/.pre-commit-hooks.yaml +++ b/.pre-commit-hooks.yaml @@ -1,6 +1,19 @@ +# C++ +- id: clang-format + name: clang-format + description: Format C/C++ sources with ‹clang-format›. + entry: clang-format -i + language: system + types: + - c + - c++ + args: + - "-style=file" + +# Rust - id: rust-fmt name: rustfmt - description: Format Rust sources with the ‹rustfmt›. + description: Format Rust sources with ‹rustfmt›. entry: rustfmt language: system types: