Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Paste
P56
.clang-format
Active
Public
Actions
Authored by
jcmcdonald
on Mar 27 2020, 3:12 PM.
Edit Paste
Archive Paste
View Raw File
Subscribe
Mute Notifications
Award Token
Tags
Standards Board [Access]
Programming [Dept]
Subscribers
None
---
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 paste.
Mar 27 2020, 3:12 PM
2020-03-27 15:12:14 (UTC-7)
jcmcdonald
created this object with edit policy "
Staff [Group]
(Project)".
jcmcdonald
mentioned this in
T1144: Clang-Format File
.
jcmcdonald
mentioned this in
Unknown Object (Slowvote Poll)
.
Mar 27 2020, 3:15 PM
2020-03-27 15:15:07 (UTC-7)
jcmcdonald
edited the content of this paste.
(Show Details)
Mar 27 2020, 5:16 PM
2020-03-27 17:16:35 (UTC-7)
jcmcdonald
edited the content of this paste.
(Show Details)
Mar 27 2020, 5:35 PM
2020-03-27 17:35:26 (UTC-7)
jcmcdonald
edited the content of this paste.
(Show Details)
Mar 27 2020, 5:46 PM
2020-03-27 17:46:43 (UTC-7)
jcmcdonald
mentioned this in
Blog Post: Standards Updates
.
Apr 10 2020, 5:44 PM
2020-04-10 17:44:02 (UTC-7)
bdlovy
mentioned this in
D288: Fix S-sB00
.
May 23 2020, 9:12 AM
2020-05-23 09:12:21 (UTC-7)
bdlovy
mentioned this in
D289: Apply formatting
.
May 23 2020, 9:26 AM
2020-05-23 09:26:50 (UTC-7)
bdlovy
mentioned this in
rRc8b4679d9d13: Apply formatting
.
May 28 2020, 9:08 AM
2020-05-28 09:08:35 (UTC-7)
jcmcdonald
edited the content of this paste.
(Show Details)
Jul 28 2020, 3:33 PM
2020-07-28 15:33:49 (UTC-7)
jcmcdonald
edited the content of this paste.
(Show Details)
Nov 10 2020, 8:25 AM
2020-11-10 08:25:43 (UTC-8)
jcmcdonald
edited the content of this paste.
(Show Details)
Nov 10 2020, 8:32 AM
2020-11-10 08:32:12 (UTC-8)
ardunster
mentioned this in
Q59: Switching from spaces to tabs (Answer 49)
.
Dec 13 2020, 2:14 PM
2020-12-13 14:14:54 (UTC-8)
jcmcdonald
mentioned this in
D354: Transformation Refactor
.
Jan 11 2021, 7:17 AM
2021-01-11 07:17:12 (UTC-8)
jcmcdonald
edited the content of this paste.
(Show Details)
Feb 20 2021, 5:24 PM
2021-02-20 17:24:02 (UTC-8)
tfu
mentioned this in
T1319: Implement arcanist-clang-format-linter
.
Jul 8 2021, 1:30 PM
2021-07-08 13:30:34 (UTC-7)
Log In to Comment