axmol/.clang-format

71 lines
1.7 KiB
Plaintext
Raw Normal View History

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-07-15 23:03:43 +08:00
# Allow double brackets such as std::vector<std::vector<int>>.
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
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
# 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
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
UseTab: Never
2023-02-16 13:13:22 +08:00
BreakConstructorInitializers: BeforeComma
2023-09-11 19:37:49 +08:00
AlignConsecutiveMacros: AcrossEmptyLines