From 40ef19ab76f2c988ae9a45801bb9a053cd12e8d3 Mon Sep 17 00:00:00 2001 From: LuK1337 Date: Sun, 4 Jan 2026 15:05:46 +0100 Subject: [PATCH] pre-commit: Enable clang-format Change-Id: I7a22a5fe9ee7176604fed0825f96417c53adb1ff --- .clang-format | 14 +++++++++++++- .pre-commit-config.yaml | 5 +++++ 2 files changed, 18 insertions(+), 1 deletion(-) mode change 120000 => 100644 .clang-format diff --git a/.clang-format b/.clang-format deleted file mode 120000 index ddcf5a2..0000000 --- a/.clang-format +++ /dev/null @@ -1 +0,0 @@ -../../build/soong/scripts/system-clang-format \ No newline at end of file diff --git a/.clang-format b/.clang-format new file mode 100644 index 0000000..a7614d2 --- /dev/null +++ b/.clang-format @@ -0,0 +1,13 @@ +BasedOnStyle: Google +Standard: Cpp11 +AccessModifierOffset: -2 +AllowShortFunctionsOnASingleLine: Inline +ColumnLimit: 100 +CommentPragmas: NOLINT:.* +DerivePointerAlignment: false +IncludeBlocks: Preserve +IndentWidth: 4 +ContinuationIndentWidth: 8 +PointerAlignment: Left +TabWidth: 4 +UseTab: Never diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index a685326..5856033 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -8,6 +8,11 @@ repos: - id: end-of-file-fixer - id: check-yaml - id: check-added-large-files + - repo: https://github.com/pre-commit/mirrors-clang-format + rev: v21.1.8 + hooks: + - id: clang-format + types_or: [c, c++] - repo: https://github.com/macisamuele/language-formatters-pre-commit-hooks rev: v2.15.0 hooks: