From dc2fc224627ccd64bb2f01a38663cde20633c31b Mon Sep 17 00:00:00 2001 From: Abdelrahman Date: Sun, 5 Jul 2026 19:00:44 +0100 Subject: [PATCH] Add .clang-format --- .clang-format | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 .clang-format diff --git a/.clang-format b/.clang-format new file mode 100644 index 0000000..3177680 --- /dev/null +++ b/.clang-format @@ -0,0 +1,30 @@ +--- +# Prism coding style — enforced by clang-format. +# Conventions that cannot be automated (e.g. return-type alignment +# across declarations) are documented in AGENTS.md. + +BasedOnStyle: LLVM + +# Indentation — tabs (no spaces) +UseTab: Always +IndentWidth: 8 +TabWidth: 8 + +# Braces — always required after if/else/for/while/do +AllowShortFunctionsOnASingleLine: false +AllowShortIfStatementsOnASingleLine: false +AllowShortLoopsOnASingleLine: false +BreakBeforeBraces: Attach + +# Pointer/reference alignment — * against name not type +PointerAlignment: Right +ReferenceAlignment: Right + +# Continuation lines — align with first parameter after ( +AlignAfterOpenBracket: Align +AlignConsecutiveAssignments: false +AlignConsecutiveDeclarations: false + +# Line width +ColumnLimit: 120 +PenaltyReturnTypeOnItsOwnLine: 1000