-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.clang-format
More file actions
41 lines (35 loc) · 1.26 KB
/
Copy path.clang-format
File metadata and controls
41 lines (35 loc) · 1.26 KB
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
34
35
36
37
38
39
40
41
# Style for UAAMGPCG — wide, readable, one-statement-per-line.
# Mirrors the hand-formatted ChorinSimulator::run(): 4-space indent,
# attached braces, spaces around operators, aligned consecutive assignments,
# no cramped single-line loops/ifs.
---
Language: Cpp
BasedOnStyle: LLVM
IndentWidth: 4
TabWidth: 4
UseTab: Never
ColumnLimit: 100
ContinuationIndentWidth: 4
AccessModifierOffset: -4
PointerAlignment: Left
ReferenceAlignment: Left
DerivePointerAlignment: false
# Alignment — gives the aligned `=` / declaration columns from the demo.
AlignConsecutiveAssignments: Consecutive
AlignAfterOpenBracket: Align
AlignOperands: Align
AlignTrailingComments: true
# Expand the cramped one-liners (for(...){a;b;} / if(x)y;) onto real lines.
AllowShortBlocksOnASingleLine: Never
AllowShortLoopsOnASingleLine: false
AllowShortIfStatementsOnASingleLine: false
AllowShortCaseLabelsOnASingleLine: false
AllowShortFunctionsOnASingleLine: Empty
# Braces attached, K&R-ish — matches `for (...) {` in the demo.
BreakBeforeBraces: Attach
SpaceBeforeParens: ControlStatements
Cpp11BracedListStyle: true
FixNamespaceComments: true
MaxEmptyLinesToKeep: 2
# Don't reorder includes — this codebase relies on include order in places.
SortIncludes: false