.clang-format 1.38 KB
Newer Older
Philip Trettner's avatar
Philip Trettner committed
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
42
43
44
45
46
47
48
49
50
51
52
53
54
# Style file for clang-format ( http://clang.llvm.org/docs/ClangFormatStyleOptions.html )

# Style is based on google's c++ coding style.
# see http://google-styleguide.googlecode.com/svn/trunk/cppguide.xml
BasedOnStyle: Google
#Language: Cpp
Standard: Cpp11


# 80 columns guideline
ColumnLimit: 150
PenaltyExcessCharacter: 1
PenaltyBreakString: 50


# Indentation and Braces
IndentWidth: 4
AllowShortIfStatementsOnASingleLine: false
AllowShortLoopsOnASingleLine: false
AllowShortFunctionsOnASingleLine: All
AlwaysBreakBeforeMultilineStrings: false
AlwaysBreakTemplateDeclarations: true
#BraceBreakingStyle: ???
BreakBeforeBinaryOperators: true
BreakBeforeTernaryOperators: true
BreakConstructorInitializersBeforeComma: false
BreakBeforeBraces: Allman
BinPackParameters: false
ConstructorInitializerAllOnOneLineOrOnePerLine: true
Cpp11BracedListStyle: true
IndentCaseLabels: false


# Spaces
DerivePointerAlignment: true
DerivePointerBinding: true
MaxEmptyLinesToKeep: 2
SpaceAfterControlStatementKeyword: true
SpaceBeforeAssignmentOperators: true
SpaceInEmptyParentheses: false
SpacesBeforeTrailingComments: 1
SpacesInAngles: false
SpacesInCStyleCastParentheses: false
SpacesInCStyleCastParentheses: false
SpacesInParentheses: false
#SpacesInSquareBrackets: false
UseTab: Never
ConstructorInitializerIndentWidth: 2
AccessModifierOffset: -4


# Comments
AlignTrailingComments: true
CommentPragmas: '!Api.*'