2021-07-15 23:03:43 +08:00
|
|
|
# This file is copy from https://github.com/google/angle with some modifications
|
2023-02-16 13:13:22 +08:00
|
|
|
# Defines the axmol style for automatic reformatting.
|
2021-07-15 23:03:43 +08:00
|
|
|
# https://code.google.com/p/angleproject/wiki/CodingStandard
|
|
|
|
# See Clang docs: http://clang.llvm.org/docs/ClangFormatStyleOptions.html
|
|
|
|
BasedOnStyle: Chromium
|
2021-04-26 08:32:25 +08:00
|
|
|
|
2021-07-15 23:03:43 +08:00
|
|
|
# Allow double brackets such as std::vector<std::vector<int>>.
|
2021-04-26 08:32:25 +08:00
|
|
|
Standard: Cpp11
|
2021-07-15 23:03:43 +08:00
|
|
|
|
|
|
|
# Indent 4 spaces at a time.
|
|
|
|
IndentWidth: 4
|
|
|
|
|
|
|
|
# Keep lines under 120 columns long.
|
|
|
|
ColumnLimit: 120
|
|
|
|
|
2021-08-28 20:22:01 +08:00
|
|
|
SortIncludes: false
|
|
|
|
|
2021-07-15 23:03:43 +08:00
|
|
|
# Always break before braces
|
|
|
|
BreakBeforeBraces: Custom
|
|
|
|
BraceWrapping:
|
|
|
|
AfterCaseLabel: true
|
|
|
|
AfterClass: true
|
|
|
|
AfterControlStatement: true
|
|
|
|
AfterEnum: true
|
|
|
|
AfterFunction: true
|
|
|
|
AfterNamespace: true
|
|
|
|
AfterStruct: true
|
|
|
|
AfterUnion: true
|
|
|
|
BeforeCatch: true
|
|
|
|
BeforeElse: true
|
|
|
|
IndentBraces: false
|
|
|
|
SplitEmptyFunction: false
|
|
|
|
SplitEmptyRecord: false
|
|
|
|
SplitEmptyNamespace: false
|
|
|
|
|
|
|
|
# Keeps extern "C" blocks unindented.
|
|
|
|
AfterExternBlock: false
|
2023-02-16 13:20:29 +08:00
|
|
|
BeforeLambdaBody: false
|
2021-07-15 23:03:43 +08:00
|
|
|
|
2023-02-16 13:13:22 +08:00
|
|
|
# Lambda body indentation
|
|
|
|
LambdaBodyIndentation: OuterScope
|
|
|
|
|
2021-07-15 23:03:43 +08:00
|
|
|
# Indent case labels.
|
2021-10-09 13:48:56 +08:00
|
|
|
IndentCaseLabels: false
|
2021-07-15 23:03:43 +08:00
|
|
|
|
2021-07-17 23:36:13 +08:00
|
|
|
# Left-align pointers and references
|
|
|
|
PointerAlignment: Left
|
2021-07-15 23:03:43 +08:00
|
|
|
|
|
|
|
# ANGLE likes to align things as much as possible.
|
|
|
|
AlignOperands: true
|
2021-04-26 08:32:25 +08:00
|
|
|
AlignConsecutiveAssignments: true
|
2021-07-15 23:03:43 +08:00
|
|
|
|
2021-07-19 12:26:25 +08:00
|
|
|
# Use 0 space negative offset for access modifiers
|
|
|
|
AccessModifierOffset: -4
|
2021-07-15 23:03:43 +08:00
|
|
|
|
|
|
|
# TODO(jmadill): Decide if we want this on. Doesn't have an "all or none" mode.
|
|
|
|
AllowShortCaseLabelsOnASingleLine: false
|
|
|
|
|
|
|
|
# Useful for spacing out functions in classes
|
|
|
|
KeepEmptyLinesAtTheStartOfBlocks: true
|
|
|
|
|
|
|
|
# Indent nested PP directives.
|
|
|
|
IndentPPDirectives: AfterHash
|
|
|
|
|
|
|
|
# Include blocks style
|
|
|
|
IncludeBlocks: Preserve
|
2021-04-26 08:32:25 +08:00
|
|
|
UseTab: Never
|
2023-02-16 13:13:22 +08:00
|
|
|
BreakConstructorInitializers: BeforeComma
|
2023-09-11 19:37:49 +08:00
|
|
|
|
|
|
|
AlignConsecutiveMacros: AcrossEmptyLines
|