加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
.clang-format 1.70 KB
一键复制 编辑 原始数据 按行查看 历史
halx99 提交于 2023-09-11 19:37 . Tidy platform macros/consts value
# This file is copy from https://github.com/google/angle with some modifications
# Defines the axmol style for automatic reformatting.
# https://code.google.com/p/angleproject/wiki/CodingStandard
# See Clang docs: http://clang.llvm.org/docs/ClangFormatStyleOptions.html
BasedOnStyle: Chromium
# Allow double brackets such as std::vector<std::vector<int>>.
Standard: Cpp11
# Indent 4 spaces at a time.
IndentWidth: 4
# Keep lines under 120 columns long.
ColumnLimit: 120
SortIncludes: false
# 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
BeforeLambdaBody: false
# Lambda body indentation
LambdaBodyIndentation: OuterScope
# Indent case labels.
IndentCaseLabels: false
# Left-align pointers and references
PointerAlignment: Left
# ANGLE likes to align things as much as possible.
AlignOperands: true
AlignConsecutiveAssignments: true
# Use 0 space negative offset for access modifiers
AccessModifierOffset: -4
# 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
BreakConstructorInitializers: BeforeComma
AlignConsecutiveMacros: AcrossEmptyLines
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化