blob: 9633f2cc833d7410749f2a88080fcb2cea681395 [file] [log] [blame]
Jamie Madill2fdd3da2015-07-20 10:14:54 -04001# Defines the ANGLE style for automatic reformatting.
2# https://code.google.com/p/angleproject/wiki/CodingStandard
3# See Clang docs: http://clang.llvm.org/docs/ClangFormatStyleOptions.html
4BasedOnStyle: Chromium
5
6# Allow double brackets such as std::vector<std::vector<int>>.
7Standard: Cpp11
8
9# Indent 4 spaces at a time.
10IndentWidth: 4
11
12# Keep lines under 100 columns long.
13ColumnLimit: 100
14
15# Always break before braces
Jamie Madill7fa88242018-11-26 13:22:57 -050016BreakBeforeBraces: Custom
17BraceWrapping:
Jamie Madill1f9e2a82020-04-28 10:04:04 -040018 AfterCaseLabel: true
Jamie Madill7fa88242018-11-26 13:22:57 -050019 AfterClass: true
20 AfterControlStatement: true
21 AfterEnum: true
22 AfterFunction: true
23 AfterNamespace: true
24 AfterStruct: true
25 AfterUnion: true
26 BeforeCatch: true
27 BeforeElse: true
28 IndentBraces: false
29 SplitEmptyFunction: false
30 SplitEmptyRecord: false
31 SplitEmptyNamespace: false
32
33 # Keeps extern "C" blocks unindented.
34 AfterExternBlock: false
Jamie Madill2fdd3da2015-07-20 10:14:54 -040035
36# Indent case labels.
37IndentCaseLabels: true
38
39# Right-align pointers and references
40PointerAlignment: Right
41
42# ANGLE likes to align things as much as possible.
43AlignOperands: true
44AlignConsecutiveAssignments: true
45
46# Use 2 space negative offset for access modifiers
47AccessModifierOffset: -2
48
49# TODO(jmadill): Decide if we want this on. Doesn't have an "all or none" mode.
50AllowShortCaseLabelsOnASingleLine: false
Jamie Madill2e5797e2015-07-29 16:20:28 -040051
52# Useful for spacing out functions in classes
53KeepEmptyLinesAtTheStartOfBlocks: true
Jamie Madill7fa88242018-11-26 13:22:57 -050054
55# Indent nested PP directives.
56IndentPPDirectives: AfterHash
Jiacheng Luf35f1112019-07-19 09:18:55 -060057
58# Include blocks style
59IncludeBlocks: Preserve