Skip to content

Instantly share code, notes, and snippets.

@kiarina
Created January 3, 2015 16:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kiarina/165380598d1c5da71830 to your computer and use it in GitHub Desktop.
Save kiarina/165380598d1c5da71830 to your computer and use it in GitHub Desktop.
clang-format for Cocos2d-x Cpp Project
Language: Cpp
AccessModifierOffset : -4
AlignEscapedNewlinesLeft: true
AlignTrailingComments: true
AllowAllParametersOfDeclarationOnNextLine: true
AllowShortFunctionsOnASingleLine: false
AllowShortIfStatementsOnASingleLine: false
AllowShortLoopsOnASingleLine: false
AlwaysBreakBeforeMultilineStrings: false
AlwaysBreakTemplateDeclarations: true
BinPackParameters: true
BreakBeforeBinaryOperators: false
BreakBeforeBraces: Attach
BreakBeforeTernaryOperators: true
BreakConstructorInitializersBeforeComma: false
ColumnLimit : 120
ConstructorInitializerAllOnOneLineOrOnePerLine: true
ConstructorInitializerIndentWidth : 4
ContinuationIndentWidth: 4
Cpp11BracedListStyle: true
DerivePointerBinding: false
ExperimentalAutoDetectBinPacking: false
IndentCaseLabels: true
IndentFunctionDeclarationAfterType: false
IndentWidth : 4
MaxEmptyLinesToKeep : 1
NamespaceIndentation: None
ObjCSpaceBeforeProtocolList: false
PenaltyBreakBeforeFirstCallParameter : 1
PenaltyBreakComment: 300
PenaltyBreakFirstLessLess : 120
PenaltyBreakString: 1000
PenaltyExcessCharacter : 1000000
PenaltyReturnTypeOnItsOwnLine: 200
PointerBindsToType: false
SpaceAfterControlStatementKeyword: true
SpaceBeforeAssignmentOperators: true
SpaceBeforeParens: ControlStatements
SpaceInEmptyParentheses: false
SpacesBeforeTrailingComments : 1
SpacesInAngles: false
SpacesInCStyleCastParentheses: false
SpacesInParentheses: false
Standard : Cpp11
TabWidth : 4
UseTab : Never
CommentPragmas: '^ IWYU pragma:'
ContinuationIndentWidth: 4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment