-
Notifications
You must be signed in to change notification settings - Fork 0
/
.clang-format
23 lines (18 loc) · 991 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
# Use LLVM style as the base
BasedOnStyle: LLVM
# Indentation
IndentWidth: 4 # Number of spaces for each indentation level
TabWidth: 4 # Number of spaces a tab counts for
UseTab: Never # Never use tabs for indentation, always use spaces
# Function formatting
AllowShortFunctionsOnASingleLine: None # Always break function definitions onto multiple lines
# Alignment
AlignConsecutiveAssignments: true # Align consecutive assignments
# Line length
ColumnLimit: 180
# Allow one-line control statements and short constructs
AllowShortIfStatementsOnASingleLine: true # Allow if statements on a single line
AllowShortLoopsOnASingleLine: true # Allow loops (for, while) on a single line
AllowShortCaseLabelsOnASingleLine: true # Allow case labels and their statements on a single line
AllowShortEnumsOnASingleLine: true # Allow short enum definitions on a single line
AllowShortLambdasOnASingleLine: All # Allow all lambdas on a single line when possible