2016-12-08 14:21:00 +00:00
|
|
|
---
|
|
|
|
# Typical usage is to apply this to the lines you've modified in a local
|
|
|
|
# change. Stage your changes with "git add" and then run:
|
|
|
|
# $ git clang-format
|
|
|
|
# You can optionally use the "--" file filter to restrict formatting to certain
|
|
|
|
# files or directories. The tool will display the list of files that were
|
|
|
|
# modified. These have been modified without being staged. You can review the
|
|
|
|
# modifications using "git diff".
|
|
|
|
#
|
2018-07-27 20:26:26 +00:00
|
|
|
# IF YOU UPDATE THE CPP SECTION ALSO UPDATE THE OBJECTIVE-C SECTION. IF YOU
|
|
|
|
# KNOW HOW TO SHARE SETTINGS BETWEEN THE TWO YOU'RE A TRUE HERO.
|
|
|
|
|
2016-12-08 14:21:00 +00:00
|
|
|
Language: Cpp
|
|
|
|
# BasedOnStyle: Google
|
|
|
|
AccessModifierOffset: -4
|
|
|
|
AlignAfterOpenBracket: Align
|
2019-03-21 13:18:24 +00:00
|
|
|
AlignConsecutiveAssignments: false
|
|
|
|
AlignConsecutiveDeclarations: false
|
2016-12-08 14:21:00 +00:00
|
|
|
AlignEscapedNewlinesLeft: true
|
|
|
|
AlignOperands: true
|
|
|
|
AlignTrailingComments: true
|
2019-03-21 13:18:24 +00:00
|
|
|
AllowAllParametersOfDeclarationOnNextLine: true
|
2016-12-08 14:21:00 +00:00
|
|
|
AllowShortBlocksOnASingleLine: false
|
2019-03-21 13:18:24 +00:00
|
|
|
AllowShortCaseLabelsOnASingleLine: false
|
2016-12-08 14:21:00 +00:00
|
|
|
AllowShortFunctionsOnASingleLine: All
|
2019-03-21 13:18:24 +00:00
|
|
|
AllowShortIfStatementsOnASingleLine: true
|
|
|
|
AllowShortLoopsOnASingleLine: true
|
2016-12-08 14:21:00 +00:00
|
|
|
AlwaysBreakAfterDefinitionReturnType: None
|
|
|
|
AlwaysBreakAfterReturnType: None
|
|
|
|
AlwaysBreakBeforeMultilineStrings: true
|
2018-12-21 02:09:52 +00:00
|
|
|
AlwaysBreakTemplateDeclarations: false
|
2021-03-04 15:50:38 +00:00
|
|
|
BinPackArguments: false
|
2020-03-27 14:31:17 +00:00
|
|
|
BinPackParameters: false
|
2018-07-27 20:26:26 +00:00
|
|
|
BraceWrapping:
|
2016-12-08 14:21:00 +00:00
|
|
|
AfterClass: false
|
|
|
|
AfterControlStatement: false
|
|
|
|
AfterEnum: false
|
|
|
|
AfterFunction: false
|
|
|
|
AfterNamespace: false
|
|
|
|
AfterObjCDeclaration: false
|
|
|
|
AfterStruct: false
|
|
|
|
AfterUnion: false
|
|
|
|
BeforeCatch: false
|
|
|
|
BeforeElse: false
|
|
|
|
IndentBraces: false
|
|
|
|
BreakBeforeBinaryOperators: None
|
|
|
|
BreakBeforeBraces: Custom
|
|
|
|
BreakBeforeTernaryOperators: true
|
|
|
|
BreakConstructorInitializersBeforeComma: true
|
|
|
|
BreakAfterJavaFieldAnnotations: false
|
|
|
|
BreakStringLiterals: true
|
|
|
|
ColumnLimit: 100
|
|
|
|
CommentPragmas: '^ IWYU pragma:'
|
|
|
|
ConstructorInitializerAllOnOneLineOrOnePerLine: true
|
2016-12-14 14:17:55 +00:00
|
|
|
ConstructorInitializerIndentWidth: 8
|
2016-12-08 14:21:00 +00:00
|
|
|
ContinuationIndentWidth: 8
|
|
|
|
Cpp11BracedListStyle: true
|
|
|
|
DerivePointerAlignment: false
|
|
|
|
DisableFormat: false
|
2021-03-04 15:50:38 +00:00
|
|
|
ExperimentalAutoDetectBinPacking: false
|
2016-12-08 14:21:00 +00:00
|
|
|
ForEachMacros: [ foreach, Q_FOREACH, BOOST_FOREACH ]
|
2018-07-27 20:26:26 +00:00
|
|
|
IncludeCategories:
|
|
|
|
- Regex: '^<.*\.h>'
|
|
|
|
Priority: 1
|
|
|
|
- Regex: '^<.*'
|
|
|
|
Priority: 2
|
|
|
|
- Regex: '.*'
|
|
|
|
Priority: 3
|
|
|
|
IncludeIsMainRegex: '([-_](test|unittest))?$'
|
|
|
|
IndentCaseLabels: true
|
|
|
|
IndentWidth: 4
|
|
|
|
IndentWrappedFunctionNames: false
|
|
|
|
JavaScriptQuotes: Leave
|
|
|
|
JavaScriptWrapImports: true
|
|
|
|
KeepEmptyLinesAtTheStartOfBlocks: false
|
|
|
|
MaxEmptyLinesToKeep: 1
|
|
|
|
NamespaceIndentation: None
|
|
|
|
ObjCBlockIndentWidth: 2
|
|
|
|
ObjCSpaceAfterProperty: false
|
|
|
|
ObjCSpaceBeforeProtocolList: false
|
|
|
|
PenaltyBreakBeforeFirstCallParameter: 1
|
|
|
|
PenaltyBreakComment: 300
|
|
|
|
PenaltyBreakFirstLessLess: 120
|
|
|
|
PenaltyBreakString: 1000
|
|
|
|
PenaltyExcessCharacter: 1000000
|
|
|
|
PenaltyReturnTypeOnItsOwnLine: 200
|
|
|
|
PointerAlignment: Left
|
|
|
|
ReflowComments: true
|
|
|
|
SortIncludes: true
|
|
|
|
SpaceAfterCStyleCast: false
|
|
|
|
SpaceAfterTemplateKeyword: true
|
|
|
|
SpaceBeforeAssignmentOperators: true
|
|
|
|
SpaceBeforeParens: ControlStatements
|
|
|
|
SpaceInEmptyParentheses: false
|
|
|
|
SpacesBeforeTrailingComments: 2
|
|
|
|
SpacesInAngles: false
|
|
|
|
SpacesInContainerLiterals: true
|
|
|
|
SpacesInCStyleCastParentheses: false
|
|
|
|
SpacesInParentheses: false
|
|
|
|
SpacesInSquareBrackets: false
|
2019-03-21 13:18:24 +00:00
|
|
|
Standard: Auto
|
2018-07-27 20:26:26 +00:00
|
|
|
TabWidth: 4
|
|
|
|
UseTab: Never
|
|
|
|
---
|
|
|
|
Language: ObjC
|
|
|
|
AccessModifierOffset: -4
|
|
|
|
AlignAfterOpenBracket: Align
|
2019-03-21 13:18:24 +00:00
|
|
|
AlignConsecutiveAssignments: false
|
|
|
|
AlignConsecutiveDeclarations: false
|
2018-07-27 20:26:26 +00:00
|
|
|
AlignEscapedNewlinesLeft: true
|
|
|
|
AlignOperands: true
|
|
|
|
AlignTrailingComments: true
|
2019-03-21 13:18:24 +00:00
|
|
|
AllowAllParametersOfDeclarationOnNextLine: true
|
2018-07-27 20:26:26 +00:00
|
|
|
AllowShortBlocksOnASingleLine: false
|
2019-03-21 13:18:24 +00:00
|
|
|
AllowShortCaseLabelsOnASingleLine: false
|
2018-07-27 20:26:26 +00:00
|
|
|
AllowShortFunctionsOnASingleLine: All
|
2019-03-21 13:18:24 +00:00
|
|
|
AllowShortIfStatementsOnASingleLine: true
|
|
|
|
AllowShortLoopsOnASingleLine: true
|
2018-07-27 20:26:26 +00:00
|
|
|
AlwaysBreakAfterDefinitionReturnType: None
|
|
|
|
AlwaysBreakAfterReturnType: None
|
|
|
|
AlwaysBreakBeforeMultilineStrings: true
|
2018-12-21 02:09:52 +00:00
|
|
|
AlwaysBreakTemplateDeclarations: false
|
2021-03-04 15:50:38 +00:00
|
|
|
BinPackArguments: false
|
2020-03-27 14:31:17 +00:00
|
|
|
BinPackParameters: false
|
2018-07-27 20:26:26 +00:00
|
|
|
BraceWrapping:
|
|
|
|
AfterClass: false
|
|
|
|
AfterControlStatement: false
|
|
|
|
AfterEnum: false
|
|
|
|
AfterFunction: false
|
|
|
|
AfterNamespace: false
|
|
|
|
AfterObjCDeclaration: false
|
|
|
|
AfterStruct: false
|
|
|
|
AfterUnion: false
|
|
|
|
BeforeCatch: false
|
|
|
|
BeforeElse: false
|
|
|
|
IndentBraces: false
|
|
|
|
BreakBeforeBinaryOperators: None
|
|
|
|
BreakBeforeBraces: Custom
|
|
|
|
BreakBeforeTernaryOperators: true
|
|
|
|
BreakConstructorInitializersBeforeComma: true
|
|
|
|
BreakAfterJavaFieldAnnotations: false
|
|
|
|
BreakStringLiterals: true
|
|
|
|
ColumnLimit: 100
|
|
|
|
CommentPragmas: '^ IWYU pragma:'
|
|
|
|
ConstructorInitializerAllOnOneLineOrOnePerLine: true
|
|
|
|
ConstructorInitializerIndentWidth: 8
|
|
|
|
ContinuationIndentWidth: 8
|
|
|
|
Cpp11BracedListStyle: true
|
|
|
|
DerivePointerAlignment: false
|
|
|
|
DisableFormat: false
|
2021-03-04 15:50:38 +00:00
|
|
|
ExperimentalAutoDetectBinPacking: false
|
2018-07-27 20:26:26 +00:00
|
|
|
ForEachMacros: [ foreach, Q_FOREACH, BOOST_FOREACH ]
|
|
|
|
IncludeCategories:
|
2016-12-08 14:21:00 +00:00
|
|
|
- Regex: '^<.*\.h>'
|
|
|
|
Priority: 1
|
|
|
|
- Regex: '^<.*'
|
|
|
|
Priority: 2
|
|
|
|
- Regex: '.*'
|
|
|
|
Priority: 3
|
|
|
|
IncludeIsMainRegex: '([-_](test|unittest))?$'
|
|
|
|
IndentCaseLabels: true
|
|
|
|
IndentWidth: 4
|
|
|
|
IndentWrappedFunctionNames: false
|
|
|
|
JavaScriptQuotes: Leave
|
|
|
|
JavaScriptWrapImports: true
|
|
|
|
KeepEmptyLinesAtTheStartOfBlocks: false
|
|
|
|
MaxEmptyLinesToKeep: 1
|
|
|
|
NamespaceIndentation: None
|
|
|
|
ObjCBlockIndentWidth: 2
|
|
|
|
ObjCSpaceAfterProperty: false
|
|
|
|
ObjCSpaceBeforeProtocolList: false
|
|
|
|
PenaltyBreakBeforeFirstCallParameter: 1
|
|
|
|
PenaltyBreakComment: 300
|
|
|
|
PenaltyBreakFirstLessLess: 120
|
|
|
|
PenaltyBreakString: 1000
|
|
|
|
PenaltyExcessCharacter: 1000000
|
|
|
|
PenaltyReturnTypeOnItsOwnLine: 200
|
|
|
|
PointerAlignment: Left
|
|
|
|
ReflowComments: true
|
|
|
|
SortIncludes: true
|
|
|
|
SpaceAfterCStyleCast: false
|
|
|
|
SpaceAfterTemplateKeyword: true
|
|
|
|
SpaceBeforeAssignmentOperators: true
|
|
|
|
SpaceBeforeParens: ControlStatements
|
|
|
|
SpaceInEmptyParentheses: false
|
|
|
|
SpacesBeforeTrailingComments: 2
|
|
|
|
SpacesInAngles: false
|
|
|
|
SpacesInContainerLiterals: true
|
|
|
|
SpacesInCStyleCastParentheses: false
|
|
|
|
SpacesInParentheses: false
|
|
|
|
SpacesInSquareBrackets: false
|
|
|
|
Standard: Auto
|
|
|
|
TabWidth: 4
|
|
|
|
UseTab: Never
|
|
|
|
...
|
2019-03-21 13:18:24 +00:00
|
|
|
|