blob: 88cc9aa8728024cf640f0adb08043aba28dcbdb6 [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:
Jiacheng Luf35f1112019-07-19 09:18:55 -060018# TODO(lujc) wait for clang-format-9 support in Chromium tools
19# AfterCaseLabel: true
Jamie Madill7fa88242018-11-26 13:22:57 -050020 AfterClass: true
21 AfterControlStatement: true
22 AfterEnum: true
23 AfterFunction: true
24 AfterNamespace: true
25 AfterStruct: true
26 AfterUnion: true
27 BeforeCatch: true
28 BeforeElse: true
29 IndentBraces: false
30 SplitEmptyFunction: false
31 SplitEmptyRecord: false
32 SplitEmptyNamespace: false
33
34 # Keeps extern "C" blocks unindented.
35 AfterExternBlock: false
Jamie Madill2fdd3da2015-07-20 10:14:54 -040036
37# Indent case labels.
38IndentCaseLabels: true
39
40# Right-align pointers and references
41PointerAlignment: Right
42
43# ANGLE likes to align things as much as possible.
44AlignOperands: true
45AlignConsecutiveAssignments: true
46
47# Use 2 space negative offset for access modifiers
48AccessModifierOffset: -2
49
50# TODO(jmadill): Decide if we want this on. Doesn't have an "all or none" mode.
51AllowShortCaseLabelsOnASingleLine: false
Jamie Madill2e5797e2015-07-29 16:20:28 -040052
53# Useful for spacing out functions in classes
54KeepEmptyLinesAtTheStartOfBlocks: true
Jamie Madill7fa88242018-11-26 13:22:57 -050055
56# Indent nested PP directives.
57IndentPPDirectives: AfterHash
Jiacheng Luf35f1112019-07-19 09:18:55 -060058
59# Include blocks style
60IncludeBlocks: Preserve