Page MenuHomePhabricator

.clang-format
ActivePublic

Authored by jcmcdonald on Mar 27 2020, 3:12 PM.
---
Language: Cpp
# https://releases.llvm.org/9.0.0/tools/clang/docs/ClangFormatStyleOptions.html
AccessModifierOffset: -4
AlignAfterOpenBracket: Align
AlignConsecutiveAssignments: false
AlignConsecutiveDeclarations: false
AlignEscapedNewlines: Left
AlignOperands: true
AlignTrailingComments: true
AllowAllArgumentsOnNextLine: false
AllowAllParametersOfDeclarationOnNextLine: true
AllowShortBlocksOnASingleLine: true # Empty for clang-format-11
AllowShortCaseLabelsOnASingleLine: false
AllowShortFunctionsOnASingleLine: All
AllowShortIfStatementsOnASingleLine: Never
AllowShortLambdasOnASingleLine: Inline
AllowShortLoopsOnASingleLine: false
AlwaysBreakAfterReturnType: None
AlwaysBreakBeforeMultilineStrings: false
AlwaysBreakTemplateDeclarations: MultiLine
BinPackArguments: false
BinPackParameters: false
BreakBeforeBinaryOperators: None
BreakBeforeBraces: Linux # a.k.a. OTBS
BreakBeforeTernaryOperators: true
BreakConstructorInitializers: BeforeColon
BreakInheritanceList: BeforeColon
BreakStringLiterals: true
ColumnLimit: 80
CommentPragmas: '^ IWYU pragma:'
CompactNamespaces: false
ConstructorInitializerAllOnOneLineOrOnePerLine: false
ConstructorInitializerIndentWidth: 0
ContinuationIndentWidth: 4
Cpp11BracedListStyle: true
DerivePointerAlignment: false
DisableFormat: false
ExperimentalAutoDetectBinPacking: false
FixNamespaceComments: true
ForEachMacros:
- foreach
- Q_FOREACH
- BOOST_FOREACH
IncludeBlocks: Regroup
IncludeCategories:
- Regex: '^<.*'
Priority: 1
- Regex: '^(<|")(cairo|eigen|eventpp|opus|pugixml|sdl2)'
Priority: 2
- Regex: '^(<|")(arctic-tern|goldilocks|iosqueak|nimbly|onestring|simplexpress)'
Priority: 3
- Regex: '^(<|")(anari|ratscript|stormsound|trailcrest)'
Priority: 4
- Regex: '^".*'
Priority: 5
IncludeIsMainRegex: '(_tests)?$'
# IndentCaseBlocks: false # clang-format-11 only
IndentCaseLabels: true
# IndentGotoLabels: false # clang-format-11 only
IndentPPDirectives: None
IndentWidth: 4
IndentWrappedFunctionNames: false
KeepEmptyLinesAtTheStartOfBlocks: false
MacroBlockBegin: ''
MacroBlockEnd: ''
MaxEmptyLinesToKeep: 1
NamespaceIndentation: Inner
PenaltyBreakAssignment: 2
PenaltyBreakBeforeFirstCallParameter: 500
PenaltyBreakComment: 300
PenaltyBreakFirstLessLess: 120
PenaltyBreakString: 1000
PenaltyBreakTemplateDeclaration: 400
PenaltyExcessCharacter: 1000000
PenaltyReturnTypeOnItsOwnLine: 500
PointerAlignment: Left
ReflowComments: true
SortIncludes: true
SortUsingDeclarations: true
SpaceAfterCStyleCast: false
SpaceAfterLogicalNot: false # DISCUSS
SpaceAfterTemplateKeyword: false
SpaceBeforeAssignmentOperators: true
SpaceBeforeCpp11BracedList: false
SpaceBeforeParens: ControlStatements
SpaceBeforeCtorInitializerColon: true
SpaceBeforeInheritanceColon: true
SpaceBeforeParens: ControlStatements
SpaceBeforeRangeBasedForLoopColon: true
# SpaceBeforeSquareBrackets: false # clang-format-11 only
# SpaceInEmptyBlock: false # clang-format-11 only
SpaceInEmptyParentheses: false
SpacesBeforeTrailingComments: 2
SpacesInAngles: false
SpacesInCStyleCastParentheses: false
# SpacesInConditionalStatement: false # clang-format-11 only
SpacesInContainerLiterals: false
SpacesInParentheses: false
SpacesInSquareBrackets: false
Standard: Cpp11 # Cpp17 on clang-format-11
TabWidth: 4
UseTab: ForContinuationAndIndentation

Event Timeline

jcmcdonald created this object with edit policy "Staff [Group] (Project)".
jcmcdonald mentioned this in Unknown Object (Slowvote Poll).Mar 27 2020, 3:15 PM