1--- 2# Typical usage is to apply this to the lines you've modified in a local 3# change. Stage your changes with "git add" and then run: 4# $ git clang-format 5# You can optionally use the "--" file filter to restrict formatting to certain 6# files or directories. The tool will display the list of files that were 7# modified. These have been modified without being staged. You can review the 8# modifications using "git diff". 9# 10# IF YOU UPDATE THE CPP SECTION ALSO UPDATE THE OBJECTIVE-C SECTION. IF YOU 11# KNOW HOW TO SHARE SETTINGS BETWEEN THE TWO YOU'RE A TRUE HERO. 12 13Language: Cpp 14# BasedOnStyle: Google 15AccessModifierOffset: -4 16AlignAfterOpenBracket: Align 17AlignConsecutiveAssignments: false 18AlignConsecutiveDeclarations: false 19AlignEscapedNewlinesLeft: true 20AlignOperands: true 21AlignTrailingComments: true 22AllowAllParametersOfDeclarationOnNextLine: true 23AllowShortBlocksOnASingleLine: false 24AllowShortCaseLabelsOnASingleLine: false 25AllowShortFunctionsOnASingleLine: All 26AllowShortIfStatementsOnASingleLine: true 27AllowShortLoopsOnASingleLine: true 28AlwaysBreakAfterDefinitionReturnType: None 29AlwaysBreakAfterReturnType: None 30AlwaysBreakBeforeMultilineStrings: true 31AlwaysBreakTemplateDeclarations: false 32BinPackArguments: true 33BinPackParameters: true 34BraceWrapping: 35 AfterClass: false 36 AfterControlStatement: false 37 AfterEnum: false 38 AfterFunction: false 39 AfterNamespace: false 40 AfterObjCDeclaration: false 41 AfterStruct: false 42 AfterUnion: false 43 BeforeCatch: false 44 BeforeElse: false 45 IndentBraces: false 46BreakBeforeBinaryOperators: None 47BreakBeforeBraces: Custom 48BreakBeforeTernaryOperators: true 49BreakConstructorInitializersBeforeComma: true 50BreakAfterJavaFieldAnnotations: false 51BreakStringLiterals: true 52ColumnLimit: 100 53CommentPragmas: '^ IWYU pragma:' 54ConstructorInitializerAllOnOneLineOrOnePerLine: true 55ConstructorInitializerIndentWidth: 8 56ContinuationIndentWidth: 8 57Cpp11BracedListStyle: true 58DerivePointerAlignment: false 59DisableFormat: false 60ExperimentalAutoDetectBinPacking: true 61ForEachMacros: [ foreach, Q_FOREACH, BOOST_FOREACH ] 62IncludeCategories: 63 - Regex: '^<.*\.h>' 64 Priority: 1 65 - Regex: '^<.*' 66 Priority: 2 67 - Regex: '.*' 68 Priority: 3 69IncludeIsMainRegex: '([-_](test|unittest))?$' 70IndentCaseLabels: true 71IndentWidth: 4 72IndentWrappedFunctionNames: false 73JavaScriptQuotes: Leave 74JavaScriptWrapImports: true 75KeepEmptyLinesAtTheStartOfBlocks: false 76MaxEmptyLinesToKeep: 1 77NamespaceIndentation: None 78ObjCBlockIndentWidth: 2 79ObjCSpaceAfterProperty: false 80ObjCSpaceBeforeProtocolList: false 81PenaltyBreakBeforeFirstCallParameter: 1 82PenaltyBreakComment: 300 83PenaltyBreakFirstLessLess: 120 84PenaltyBreakString: 1000 85PenaltyExcessCharacter: 1000000 86PenaltyReturnTypeOnItsOwnLine: 200 87PointerAlignment: Left 88ReflowComments: true 89SortIncludes: true 90SpaceAfterCStyleCast: false 91SpaceAfterTemplateKeyword: true 92SpaceBeforeAssignmentOperators: true 93SpaceBeforeParens: ControlStatements 94SpaceInEmptyParentheses: false 95SpacesBeforeTrailingComments: 2 96SpacesInAngles: false 97SpacesInContainerLiterals: true 98SpacesInCStyleCastParentheses: false 99SpacesInParentheses: false 100SpacesInSquareBrackets: false 101Standard: Auto 102TabWidth: 4 103UseTab: Never 104--- 105Language: ObjC 106AccessModifierOffset: -4 107AlignAfterOpenBracket: Align 108AlignConsecutiveAssignments: false 109AlignConsecutiveDeclarations: false 110AlignEscapedNewlinesLeft: true 111AlignOperands: true 112AlignTrailingComments: true 113AllowAllParametersOfDeclarationOnNextLine: true 114AllowShortBlocksOnASingleLine: false 115AllowShortCaseLabelsOnASingleLine: false 116AllowShortFunctionsOnASingleLine: All 117AllowShortIfStatementsOnASingleLine: true 118AllowShortLoopsOnASingleLine: true 119AlwaysBreakAfterDefinitionReturnType: None 120AlwaysBreakAfterReturnType: None 121AlwaysBreakBeforeMultilineStrings: true 122AlwaysBreakTemplateDeclarations: false 123BinPackArguments: true 124BinPackParameters: true 125BraceWrapping: 126 AfterClass: false 127 AfterControlStatement: false 128 AfterEnum: false 129 AfterFunction: false 130 AfterNamespace: false 131 AfterObjCDeclaration: false 132 AfterStruct: false 133 AfterUnion: false 134 BeforeCatch: false 135 BeforeElse: false 136 IndentBraces: false 137BreakBeforeBinaryOperators: None 138BreakBeforeBraces: Custom 139BreakBeforeTernaryOperators: true 140BreakConstructorInitializersBeforeComma: true 141BreakAfterJavaFieldAnnotations: false 142BreakStringLiterals: true 143ColumnLimit: 100 144CommentPragmas: '^ IWYU pragma:' 145ConstructorInitializerAllOnOneLineOrOnePerLine: true 146ConstructorInitializerIndentWidth: 8 147ContinuationIndentWidth: 8 148Cpp11BracedListStyle: true 149DerivePointerAlignment: false 150DisableFormat: false 151ExperimentalAutoDetectBinPacking: true 152ForEachMacros: [ foreach, Q_FOREACH, BOOST_FOREACH ] 153IncludeCategories: 154 - Regex: '^<.*\.h>' 155 Priority: 1 156 - Regex: '^<.*' 157 Priority: 2 158 - Regex: '.*' 159 Priority: 3 160IncludeIsMainRegex: '([-_](test|unittest))?$' 161IndentCaseLabels: true 162IndentWidth: 4 163IndentWrappedFunctionNames: false 164JavaScriptQuotes: Leave 165JavaScriptWrapImports: true 166KeepEmptyLinesAtTheStartOfBlocks: false 167MaxEmptyLinesToKeep: 1 168NamespaceIndentation: None 169ObjCBlockIndentWidth: 2 170ObjCSpaceAfterProperty: false 171ObjCSpaceBeforeProtocolList: false 172PenaltyBreakBeforeFirstCallParameter: 1 173PenaltyBreakComment: 300 174PenaltyBreakFirstLessLess: 120 175PenaltyBreakString: 1000 176PenaltyExcessCharacter: 1000000 177PenaltyReturnTypeOnItsOwnLine: 200 178PointerAlignment: Left 179ReflowComments: true 180SortIncludes: true 181SpaceAfterCStyleCast: false 182SpaceAfterTemplateKeyword: true 183SpaceBeforeAssignmentOperators: true 184SpaceBeforeParens: ControlStatements 185SpaceInEmptyParentheses: false 186SpacesBeforeTrailingComments: 2 187SpacesInAngles: false 188SpacesInContainerLiterals: true 189SpacesInCStyleCastParentheses: false 190SpacesInParentheses: false 191SpacesInSquareBrackets: false 192Standard: Auto 193TabWidth: 4 194UseTab: Never 195... 196 197