summaryrefslogtreecommitdiffstats
path: root/.clang-format
diff options
context:
space:
mode:
authorFilip Wandzio <contact@philw.dev>2026-03-01 11:33:21 +0100
committerFilip Wandzio <contact@philw.dev>2026-03-01 11:33:21 +0100
commit57b077a4788b7fb5ed6add1df4ba3f15c9e6349b (patch)
tree3c860dbe703f2d7269bba72b943f0dd89e8b076e /.clang-format
parenta2afca302c68b8b5d7c3bec13378180b60a3ac17 (diff)
downloadysnp-57b077a4788b7fb5ed6add1df4ba3f15c9e6349b.tar.gz
ysnp-57b077a4788b7fb5ed6add1df4ba3f15c9e6349b.zip
Add editor configs and formatter rules
Signed-off-by: Filip Wandzio <contact@philw.dev>
Diffstat (limited to '')
-rw-r--r--.clang-format31
1 files changed, 31 insertions, 0 deletions
diff --git a/.clang-format b/.clang-format
new file mode 100644
index 0000000..670c9d1
--- /dev/null
+++ b/.clang-format
@@ -0,0 +1,31 @@
1Language: C
2BasedOnStyle: LLVM
3AccessModifierOffset: -4
4AlignAfterOpenBracket: Align
5AlignConsecutiveAssignments: false
6AlignConsecutiveDeclarations: false
7AlignEscapedNewlines: Left
8AlignOperands: true
9AlignTrailingComments: true
10AllowAllParametersOfDeclarationOnNextLine: false
11AllowShortCaseLabelsOnASingleLine: false
12AllowShortFunctionsOnASingleLine: InlineOnly
13AllowShortIfStatementsOnASingleLine: false
14AllowShortLoopsOnASingleLine: false
15AlwaysBreakAfterReturnType: None
16BinPackArguments: false
17BinPackParameters: false
18BreakBeforeBinaryOperators: NonAssignment
19BreakBeforeBraces: Linux
20BreakBeforeTernaryOperators: true
21BreakConstructorInitializersBeforeComma: true
22ColumnLimit: 80
23ConstructorInitializerAllOnOneLineOrOnePerLine: true
24DerivePointerAlignment: false
25IndentCaseLabels: true
26IndentWidth: 8
27KeepEmptyLinesAtTheStartOfBlocks: false
28PointerAlignment: Left
29SpacesBeforeTrailingComments: 1
30TabWidth: 8
31UseTab: Always