123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196 |
- ---
- # 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".
- #
- # 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.
- Language: Cpp
- # BasedOnStyle: Google
- AccessModifierOffset: -4
- AlignAfterOpenBracket: Align
- AlignConsecutiveAssignments: false
- AlignConsecutiveDeclarations: false
- AlignEscapedNewlinesLeft: true
- AlignOperands: true
- AlignTrailingComments: true
- AllowAllParametersOfDeclarationOnNextLine: true
- AllowShortBlocksOnASingleLine: false
- AllowShortCaseLabelsOnASingleLine: false
- AllowShortFunctionsOnASingleLine: All
- AllowShortIfStatementsOnASingleLine: true
- AllowShortLoopsOnASingleLine: true
- AlwaysBreakAfterDefinitionReturnType: None
- AlwaysBreakAfterReturnType: None
- AlwaysBreakBeforeMultilineStrings: true
- AlwaysBreakTemplateDeclarations: false
- BinPackArguments: true
- BinPackParameters: true
- 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
- ExperimentalAutoDetectBinPacking: true
- ForEachMacros: [ foreach, Q_FOREACH, BOOST_FOREACH ]
- 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
- Standard: Auto
- TabWidth: 4
- UseTab: Never
- ---
- Language: ObjC
- AccessModifierOffset: -4
- AlignAfterOpenBracket: Align
- AlignConsecutiveAssignments: false
- AlignConsecutiveDeclarations: false
- AlignEscapedNewlinesLeft: true
- AlignOperands: true
- AlignTrailingComments: true
- AllowAllParametersOfDeclarationOnNextLine: true
- AllowShortBlocksOnASingleLine: false
- AllowShortCaseLabelsOnASingleLine: false
- AllowShortFunctionsOnASingleLine: All
- AllowShortIfStatementsOnASingleLine: true
- AllowShortLoopsOnASingleLine: true
- AlwaysBreakAfterDefinitionReturnType: None
- AlwaysBreakAfterReturnType: None
- AlwaysBreakBeforeMultilineStrings: true
- AlwaysBreakTemplateDeclarations: false
- BinPackArguments: true
- BinPackParameters: true
- 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
- ExperimentalAutoDetectBinPacking: true
- ForEachMacros: [ foreach, Q_FOREACH, BOOST_FOREACH ]
- 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
- Standard: Auto
- TabWidth: 4
- UseTab: Never
- ...
|