Brian Salomon | b4a24e5 | 2016-12-08 09:21:00 -0500 | [diff] [blame] | 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 | # |
Brian Salomon | 2183142 | 2018-07-27 16:26:26 -0400 | [diff] [blame] | 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 | |
Brian Salomon | b4a24e5 | 2016-12-08 09:21:00 -0500 | [diff] [blame] | 13 | Language: Cpp |
| 14 | # BasedOnStyle: Google |
| 15 | AccessModifierOffset: -4 |
| 16 | AlignAfterOpenBracket: Align |
| 17 | AlignConsecutiveAssignments: false |
| 18 | AlignConsecutiveDeclarations: false |
| 19 | AlignEscapedNewlinesLeft: true |
| 20 | AlignOperands: true |
| 21 | AlignTrailingComments: true |
| 22 | AllowAllParametersOfDeclarationOnNextLine: true |
| 23 | AllowShortBlocksOnASingleLine: false |
| 24 | AllowShortCaseLabelsOnASingleLine: false |
| 25 | AllowShortFunctionsOnASingleLine: All |
Mike Klein | 8f45138 | 2018-05-24 13:27:13 +0000 | [diff] [blame] | 26 | AllowShortIfStatementsOnASingleLine: true |
| 27 | AllowShortLoopsOnASingleLine: true |
Brian Salomon | b4a24e5 | 2016-12-08 09:21:00 -0500 | [diff] [blame] | 28 | AlwaysBreakAfterDefinitionReturnType: None |
| 29 | AlwaysBreakAfterReturnType: None |
| 30 | AlwaysBreakBeforeMultilineStrings: true |
| 31 | AlwaysBreakTemplateDeclarations: true |
| 32 | BinPackArguments: true |
| 33 | BinPackParameters: true |
Brian Salomon | 2183142 | 2018-07-27 16:26:26 -0400 | [diff] [blame] | 34 | BraceWrapping: |
Brian Salomon | b4a24e5 | 2016-12-08 09:21:00 -0500 | [diff] [blame] | 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 |
| 46 | BreakBeforeBinaryOperators: None |
| 47 | BreakBeforeBraces: Custom |
| 48 | BreakBeforeTernaryOperators: true |
| 49 | BreakConstructorInitializersBeforeComma: true |
| 50 | BreakAfterJavaFieldAnnotations: false |
| 51 | BreakStringLiterals: true |
| 52 | ColumnLimit: 100 |
| 53 | CommentPragmas: '^ IWYU pragma:' |
| 54 | ConstructorInitializerAllOnOneLineOrOnePerLine: true |
Brian Salomon | 544851b | 2016-12-14 09:17:55 -0500 | [diff] [blame] | 55 | ConstructorInitializerIndentWidth: 8 |
Brian Salomon | b4a24e5 | 2016-12-08 09:21:00 -0500 | [diff] [blame] | 56 | ContinuationIndentWidth: 8 |
| 57 | Cpp11BracedListStyle: true |
| 58 | DerivePointerAlignment: false |
| 59 | DisableFormat: false |
| 60 | ExperimentalAutoDetectBinPacking: true |
| 61 | ForEachMacros: [ foreach, Q_FOREACH, BOOST_FOREACH ] |
Brian Salomon | 2183142 | 2018-07-27 16:26:26 -0400 | [diff] [blame] | 62 | IncludeCategories: |
| 63 | - Regex: '^<.*\.h>' |
| 64 | Priority: 1 |
| 65 | - Regex: '^<.*' |
| 66 | Priority: 2 |
| 67 | - Regex: '.*' |
| 68 | Priority: 3 |
| 69 | IncludeIsMainRegex: '([-_](test|unittest))?$' |
| 70 | IndentCaseLabels: true |
| 71 | IndentWidth: 4 |
| 72 | IndentWrappedFunctionNames: false |
| 73 | JavaScriptQuotes: Leave |
| 74 | JavaScriptWrapImports: true |
| 75 | KeepEmptyLinesAtTheStartOfBlocks: false |
| 76 | MacroBlockBegin: 'SK_DEFINE_FLATTENABLE_REGISTRAR_GROUP_START' |
| 77 | MacroBlockEnd: 'SK_DEFINE_FLATTENABLE_REGISTRAR_GROUP_END' |
| 78 | MaxEmptyLinesToKeep: 1 |
| 79 | NamespaceIndentation: None |
| 80 | ObjCBlockIndentWidth: 2 |
| 81 | ObjCSpaceAfterProperty: false |
| 82 | ObjCSpaceBeforeProtocolList: false |
| 83 | PenaltyBreakBeforeFirstCallParameter: 1 |
| 84 | PenaltyBreakComment: 300 |
| 85 | PenaltyBreakFirstLessLess: 120 |
| 86 | PenaltyBreakString: 1000 |
| 87 | PenaltyExcessCharacter: 1000000 |
| 88 | PenaltyReturnTypeOnItsOwnLine: 200 |
| 89 | PointerAlignment: Left |
| 90 | ReflowComments: true |
| 91 | SortIncludes: true |
| 92 | SpaceAfterCStyleCast: false |
| 93 | SpaceAfterTemplateKeyword: true |
| 94 | SpaceBeforeAssignmentOperators: true |
| 95 | SpaceBeforeParens: ControlStatements |
| 96 | SpaceInEmptyParentheses: false |
| 97 | SpacesBeforeTrailingComments: 2 |
| 98 | SpacesInAngles: false |
| 99 | SpacesInContainerLiterals: true |
| 100 | SpacesInCStyleCastParentheses: false |
| 101 | SpacesInParentheses: false |
| 102 | SpacesInSquareBrackets: false |
| 103 | Standard: Auto |
| 104 | TabWidth: 4 |
| 105 | UseTab: Never |
| 106 | --- |
| 107 | Language: ObjC |
| 108 | AccessModifierOffset: -4 |
| 109 | AlignAfterOpenBracket: Align |
| 110 | AlignConsecutiveAssignments: false |
| 111 | AlignConsecutiveDeclarations: false |
| 112 | AlignEscapedNewlinesLeft: true |
| 113 | AlignOperands: true |
| 114 | AlignTrailingComments: true |
| 115 | AllowAllParametersOfDeclarationOnNextLine: true |
| 116 | AllowShortBlocksOnASingleLine: false |
| 117 | AllowShortCaseLabelsOnASingleLine: false |
| 118 | AllowShortFunctionsOnASingleLine: All |
| 119 | AllowShortIfStatementsOnASingleLine: true |
| 120 | AllowShortLoopsOnASingleLine: true |
| 121 | AlwaysBreakAfterDefinitionReturnType: None |
| 122 | AlwaysBreakAfterReturnType: None |
| 123 | AlwaysBreakBeforeMultilineStrings: true |
| 124 | AlwaysBreakTemplateDeclarations: true |
| 125 | BinPackArguments: true |
| 126 | BinPackParameters: true |
| 127 | BraceWrapping: |
| 128 | AfterClass: false |
| 129 | AfterControlStatement: false |
| 130 | AfterEnum: false |
| 131 | AfterFunction: false |
| 132 | AfterNamespace: false |
| 133 | AfterObjCDeclaration: false |
| 134 | AfterStruct: false |
| 135 | AfterUnion: false |
| 136 | BeforeCatch: false |
| 137 | BeforeElse: false |
| 138 | IndentBraces: false |
| 139 | BreakBeforeBinaryOperators: None |
| 140 | BreakBeforeBraces: Custom |
| 141 | BreakBeforeTernaryOperators: true |
| 142 | BreakConstructorInitializersBeforeComma: true |
| 143 | BreakAfterJavaFieldAnnotations: false |
| 144 | BreakStringLiterals: true |
| 145 | ColumnLimit: 100 |
| 146 | CommentPragmas: '^ IWYU pragma:' |
| 147 | ConstructorInitializerAllOnOneLineOrOnePerLine: true |
| 148 | ConstructorInitializerIndentWidth: 8 |
| 149 | ContinuationIndentWidth: 8 |
| 150 | Cpp11BracedListStyle: true |
| 151 | DerivePointerAlignment: false |
| 152 | DisableFormat: false |
| 153 | ExperimentalAutoDetectBinPacking: true |
| 154 | ForEachMacros: [ foreach, Q_FOREACH, BOOST_FOREACH ] |
| 155 | IncludeCategories: |
Brian Salomon | b4a24e5 | 2016-12-08 09:21:00 -0500 | [diff] [blame] | 156 | - Regex: '^<.*\.h>' |
| 157 | Priority: 1 |
| 158 | - Regex: '^<.*' |
| 159 | Priority: 2 |
| 160 | - Regex: '.*' |
| 161 | Priority: 3 |
| 162 | IncludeIsMainRegex: '([-_](test|unittest))?$' |
| 163 | IndentCaseLabels: true |
| 164 | IndentWidth: 4 |
| 165 | IndentWrappedFunctionNames: false |
| 166 | JavaScriptQuotes: Leave |
| 167 | JavaScriptWrapImports: true |
| 168 | KeepEmptyLinesAtTheStartOfBlocks: false |
Brian Salomon | c083e4f | 2017-01-09 09:37:06 -0500 | [diff] [blame] | 169 | MacroBlockBegin: 'SK_DEFINE_FLATTENABLE_REGISTRAR_GROUP_START' |
| 170 | MacroBlockEnd: 'SK_DEFINE_FLATTENABLE_REGISTRAR_GROUP_END' |
Brian Salomon | b4a24e5 | 2016-12-08 09:21:00 -0500 | [diff] [blame] | 171 | MaxEmptyLinesToKeep: 1 |
| 172 | NamespaceIndentation: None |
| 173 | ObjCBlockIndentWidth: 2 |
| 174 | ObjCSpaceAfterProperty: false |
| 175 | ObjCSpaceBeforeProtocolList: false |
| 176 | PenaltyBreakBeforeFirstCallParameter: 1 |
| 177 | PenaltyBreakComment: 300 |
| 178 | PenaltyBreakFirstLessLess: 120 |
| 179 | PenaltyBreakString: 1000 |
| 180 | PenaltyExcessCharacter: 1000000 |
| 181 | PenaltyReturnTypeOnItsOwnLine: 200 |
| 182 | PointerAlignment: Left |
| 183 | ReflowComments: true |
| 184 | SortIncludes: true |
| 185 | SpaceAfterCStyleCast: false |
| 186 | SpaceAfterTemplateKeyword: true |
| 187 | SpaceBeforeAssignmentOperators: true |
| 188 | SpaceBeforeParens: ControlStatements |
| 189 | SpaceInEmptyParentheses: false |
| 190 | SpacesBeforeTrailingComments: 2 |
| 191 | SpacesInAngles: false |
| 192 | SpacesInContainerLiterals: true |
| 193 | SpacesInCStyleCastParentheses: false |
| 194 | SpacesInParentheses: false |
| 195 | SpacesInSquareBrackets: false |
| 196 | Standard: Auto |
| 197 | TabWidth: 4 |
| 198 | UseTab: Never |
| 199 | ... |
| 200 | |