当前位置: 首页 > news >正文

CPP 格式化文件 .clang-format

---
Language: Cpp
# BasedOnStyle:  ChromiumColumnLimit: 0            # 注释与代码不再受列数限制
ReflowComments: false     # 禁止自动重新排版注释MaxEmptyLinesToKeep: 1
SeparateDefinitionBlocks: Always   # 让函数/方法之间保持空行
EmptyLineBeforeAccessModifier: AlwaysAllowShortFunctionsOnASingleLine: Inline#(其余保持你的原样)
AccessModifierOffset: -2
AlignAfterOpenBracket: Align
AlignConsecutiveMacros: None
AlignConsecutiveAssignments: true
AlignConsecutiveBitFields: None
AlignConsecutiveDeclarations: true
AlignEscapedNewlines: Left
AlignOperands: Align
AlignTrailingComments: true
AllowAllArgumentsOnNextLine: true
AllowAllConstructorInitializersOnNextLine: true
AllowAllParametersOfDeclarationOnNextLine: false
AllowShortEnumsOnASingleLine: true
AllowShortBlocksOnASingleLine: Never
AllowShortCaseLabelsOnASingleLine: false
AllowShortLambdasOnASingleLine: All
AllowShortIfStatementsOnASingleLine: Never
AllowShortLoopsOnASingleLine: false
AlwaysBreakAfterDefinitionReturnType: None
AlwaysBreakAfterReturnType: None
AlwaysBreakBeforeMultilineStrings: true
AlwaysBreakTemplateDeclarations: Yes
AttributeMacros:- __capability
BinPackArguments: true
BinPackParameters: false
BraceWrapping:AfterCaseLabel: falseAfterClass: trueAfterControlStatement: NeverAfterEnum: falseAfterFunction: trueAfterNamespace: trueAfterObjCDeclaration: falseAfterStruct: trueAfterUnion: falseAfterExternBlock: falseBeforeCatch: falseBeforeElse: falseBeforeLambdaBody: falseBeforeWhile: falseIndentBraces: falseSplitEmptyFunction: trueSplitEmptyRecord: trueSplitEmptyNamespace: true
BreakBeforeBinaryOperators: None
BreakBeforeConceptDeclarations: true
BreakBeforeBraces: Custom
BreakBeforeInheritanceComma: false
BreakInheritanceList: BeforeColon
BreakBeforeTernaryOperators: true
BreakConstructorInitializersBeforeComma: false
BreakConstructorInitializers: BeforeColon
BreakAfterJavaFieldAnnotations: false
BreakStringLiterals: true
CommentPragmas: "^ IWYU pragma:"
CompactNamespaces: false
ConstructorInitializerAllOnOneLineOrOnePerLine: true
ConstructorInitializerIndentWidth: 4
ContinuationIndentWidth: 4
Cpp11BracedListStyle: true
DeriveLineEnding: true
DerivePointerAlignment: false
DisableFormat: false
ExperimentalAutoDetectBinPacking: false
FixNamespaceComments: true
ForEachMacros:- foreach- Q_FOREACH- BOOST_FOREACH
StatementAttributeLikeMacros:- Q_EMIT
IncludeBlocks: Preserve
IncludeCategories:- Regex: '^<ext/.*\.h>'Priority: 2SortPriority: 0CaseSensitive: false- Regex: '^<.*\.h>'Priority: 1SortPriority: 0CaseSensitive: false- Regex: "^<.*"Priority: 2SortPriority: 0CaseSensitive: false- Regex: ".*"Priority: 3SortPriority: 0CaseSensitive: false
IncludeIsMainRegex: "([-_](test|unittest))?$"
IncludeIsMainSourceRegex: ""
IndentCaseLabels: true
IndentCaseBlocks: false
IndentGotoLabels: true
IndentPPDirectives: None
IndentExternBlock: AfterExternBlock
IndentRequires: false
IndentWidth: 4
IndentWrappedFunctionNames: false
InsertTrailingCommas: None
JavaScriptQuotes: Leave
JavaScriptWrapImports: true
KeepEmptyLinesAtTheStartOfBlocks: false
MacroBlockBegin: ""
MacroBlockEnd: ""
NamespaceIndentation: None
ObjCBinPackProtocolList: Never
ObjCBlockIndentWidth: 4
ObjCBreakBeforeNestedBlockParam: true
ObjCSpaceAfterProperty: false
ObjCSpaceBeforeProtocolList: true
PenaltyBreakAssignment: 2
PenaltyBreakBeforeFirstCallParameter: 1
PenaltyBreakComment: 300
PenaltyBreakFirstLessLess: 120
PenaltyBreakString: 1000
PenaltyBreakTemplateDeclaration: 10
PenaltyExcessCharacter: 1000000
PenaltyReturnTypeOnItsOwnLine: 200
PenaltyIndentedWhitespace: 0
PointerAlignment: Left
RawStringFormats:- Language: CppDelimiters:- cc- CC- cpp- Cpp- CPP- "c++"- "C++"CanonicalDelimiter: ""BasedOnStyle: google- Language: TextProtoDelimiters:- pb- PB- proto- PROTOEnclosingFunctions:- EqualsProto- EquivToProto- PARSE_PARTIAL_TEXT_PROTO- PARSE_TEST_PROTO- PARSE_TEXT_PROTO- ParseTextOrDie- ParseTextProtoOrDie- ParseTestProto- ParsePartialTestProtoCanonicalDelimiter: ""BasedOnStyle: google
SortIncludes: false
SortJavaStaticImport: Before
SortUsingDeclarations: true
SpaceAfterCStyleCast: false
SpaceAfterLogicalNot: false
SpaceAfterTemplateKeyword: true
SpaceBeforeAssignmentOperators: true
SpaceBeforeCaseColon: false
SpaceBeforeCpp11BracedList: false
SpaceBeforeCtorInitializerColon: true
SpaceBeforeInheritanceColon: true
SpaceBeforeParens: ControlStatements
SpaceAroundPointerQualifiers: Default
SpaceBeforeRangeBasedForLoopColon: true
SpaceInEmptyBlock: false
SpaceInEmptyParentheses: false
SpacesBeforeTrailingComments: 2
SpacesInAngles: false
SpacesInConditionalStatement: false
SpacesInContainerLiterals: true
SpacesInCStyleCastParentheses: false
SpacesInParentheses: false
SpacesInSquareBrackets: false
SpaceBeforeSquareBrackets: false
BitFieldColonSpacing: Both
Standard: Auto
StatementMacros:- Q_UNUSED- QT_REQUIRE_VERSION
TabWidth: 8
UseCRLF: false
UseTab: Never
WhitespaceSensitiveMacros:- STRINGIZE- PP_STRINGIZE- BOOST_PP_STRINGIZE- NS_SWIFT_NAME- CF_SWIFT_NAME
---
http://www.rkmt.cn/news/53171.html

相关文章:

  • 通过SSH转发端口
  • CVPR 2024 目标检测!开放词汇
  • linux apache 解析php
  • linux apache 的日志
  • 权威发布:2025年度MES系统综合排名,聚焦实用功能与选型避坑指南
  • 2025年遗产继承咨询律师权威推荐榜单:遗产继承/婚姻诉讼/财产纠纷律师精选
  • 2025年11月合肥抗衰老公司排名情况
  • LINUX在线扩文件系统(/目录)
  • 18new - when
  • linux apache 服务器搭建
  • 2025杭州最好的留学中介是哪家公司
  • 2025年11月国内PMS酒店管理系统公司排行榜:智能化升级的十大优选方案
  • 687
  • 视频汇聚平台EasyCVR构筑新时代边防哨所的“智能视觉防线”
  • 从“人防”到“技防”:视频融合平台EasyCVR打造快递代收点智能视频监控网
  • 2025年塑料回收行业领军企业排名出炉,塑料回收供应商TOP企业引领行业技术新高度
  • 2025杭州最好的留学中介排名榜单
  • 2025办理出国留学机构哪家好
  • 21、LIKE 子句详解
  • 2025年国内锯床公司权威排名榜单:成都鸿远机械有限公司排名首位
  • 2025成都留学机构十大排名
  • show 语法
  • 罗氏线圈积分技术:从理论到工程的精确电流重构
  • linux android 搭建
  • AI 十大论文精讲(五):RAG——让大模型 “告别幻觉、实时更新” 的检索增强生成秘籍
  • 2025年耐高压硅胶线批发厂家权威推荐榜单:硅胶线哪家质量好/硅胶多芯线/陶瓷化硅胶线源头厂家精选
  • AI 十大论文精讲(三):RLHF 范式奠基 ——InstructGPT 如何让大模型 “听懂人话”
  • 【LVGL】圆弧部件
  • 2025年电机生产流水线实力厂家权威推荐:电机生产线/无刷电机自动生产线/电机自动化生产源头厂家精选
  • [题解]BYOI Round 1 T1~T2