Add .clang-format

This commit is contained in:
2026-07-05 19:00:44 +01:00
parent 867b00279a
commit dc2fc22462
+30
View File
@@ -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