forked from au-ts/sddf
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.clang-format
33 lines (31 loc) · 872 Bytes
/
.clang-format
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
# Copyright 2024, UNSW
#
# SPDX-License-Identifier: BSD-2-Clause
Language: Cpp
ColumnLimit: 120
IndentWidth: 4
UseTab: Never
ReflowComments: false
SortIncludes: Never
PointerAlignment: Right
AlignTrailingComments:
Kind: Leave
# function() \n{} vs function() {}
BreakBeforeBraces: Linux
# we prefer expanded
AllowShortFunctionsOnASingleLine: None
# while(true); vs while(true)\n;
AllowShortLoopsOnASingleLine: true
AllowShortBlocksOnASingleLine: Empty
# (struct xxx) {} vs (struct xxx){}
SpaceBeforeCpp11BracedList: true
# { 1, 2, 3 } (false) vs {1, 2, 3} (true).
Cpp11BracedListStyle: false
# don't do anything to macros
SkipMacroDefinitionBody: true
# break before + etc
BreakBeforeBinaryOperators: NonAssignment
# align operands with the = sign.
AlignOperands: AlignAfterOperator
# try not to break around =
PenaltyBreakAssignment: 50