.clang-format 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. ---
  2. BasedOnStyle: Google
  3. AccessModifierOffset: -2
  4. ConstructorInitializerIndentWidth: 2
  5. AlignEscapedNewlinesLeft: false
  6. AlignTrailingComments: true
  7. AllowAllParametersOfDeclarationOnNextLine: false
  8. AllowShortIfStatementsOnASingleLine: false
  9. AllowShortLoopsOnASingleLine: false
  10. AllowShortFunctionsOnASingleLine: None
  11. AllowShortLoopsOnASingleLine: false
  12. AlwaysBreakTemplateDeclarations: true
  13. AlwaysBreakBeforeMultilineStrings: false
  14. BreakBeforeBinaryOperators: false
  15. BreakBeforeTernaryOperators: false
  16. BreakConstructorInitializersBeforeComma: true
  17. BinPackParameters: true
  18. ColumnLimit: 120
  19. ConstructorInitializerAllOnOneLineOrOnePerLine: true
  20. DerivePointerBinding: false
  21. PointerBindsToType: true
  22. ExperimentalAutoDetectBinPacking: false
  23. IndentCaseLabels: true
  24. MaxEmptyLinesToKeep: 1
  25. NamespaceIndentation: None
  26. ObjCSpaceBeforeProtocolList: true
  27. PenaltyBreakBeforeFirstCallParameter: 19
  28. PenaltyBreakComment: 60
  29. PenaltyBreakString: 1
  30. PenaltyBreakFirstLessLess: 1000
  31. PenaltyExcessCharacter: 1000
  32. PenaltyReturnTypeOnItsOwnLine: 90
  33. SpacesBeforeTrailingComments: 2
  34. Cpp11BracedListStyle: false
  35. Standard: Auto
  36. IndentWidth: 2
  37. TabWidth: 2
  38. UseTab: Never
  39. IndentFunctionDeclarationAfterType: false
  40. SpacesInParentheses: false
  41. SpacesInAngles: false
  42. SpaceInEmptyParentheses: false
  43. SpacesInCStyleCastParentheses: false
  44. SpaceAfterControlStatementKeyword: true
  45. SpaceBeforeAssignmentOperators: true
  46. ContinuationIndentWidth: 4
  47. SortIncludes: false
  48. SpaceAfterCStyleCast: false
  49. # Configure each individual brace in BraceWrapping
  50. BreakBeforeBraces: Custom
  51. # Control of individual brace wrapping cases
  52. BraceWrapping: {
  53. AfterClass: 'true'
  54. AfterControlStatement: 'true'
  55. AfterEnum : 'true'
  56. AfterFunction : 'true'
  57. AfterNamespace : 'true'
  58. AfterStruct : 'true'
  59. AfterUnion : 'true'
  60. BeforeCatch : 'true'
  61. BeforeElse : 'true'
  62. IndentBraces : 'false'
  63. }
  64. ...