pre-commit: Enable clang-format

Change-Id: I7a22a5fe9ee7176604fed0825f96417c53adb1ff
This commit is contained in:
LuK1337
2026-01-04 15:05:46 +01:00
committed by TechPanelGM
parent 80718930bd
commit b44d204d85
2 changed files with 18 additions and 1 deletions

View File

@@ -1 +0,0 @@
../../build/soong/scripts/system-clang-format

13
.clang-format Normal file
View File

@@ -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

View File

@@ -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: