.clang-format 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116
  1. ---
  2. Language: Cpp
  3. # BasedOnStyle: Google
  4. AccessModifierOffset: -1
  5. AlignAfterOpenBracket: Align
  6. AlignConsecutiveAssignments: false
  7. AlignConsecutiveDeclarations: false
  8. AlignEscapedNewlines: Left
  9. AlignOperands: true
  10. AlignTrailingComments: true
  11. AllowAllParametersOfDeclarationOnNextLine: true
  12. AllowShortBlocksOnASingleLine: false
  13. AllowShortCaseLabelsOnASingleLine: false
  14. AllowShortFunctionsOnASingleLine: false
  15. AllowShortIfStatementsOnASingleLine: true
  16. AllowShortLoopsOnASingleLine: true
  17. AlwaysBreakAfterDefinitionReturnType: None
  18. AlwaysBreakAfterReturnType: None
  19. AlwaysBreakBeforeMultilineStrings: true
  20. AlwaysBreakTemplateDeclarations: true
  21. BinPackArguments: true
  22. BinPackParameters: true
  23. BraceWrapping:
  24. AfterClass: false
  25. AfterControlStatement: false
  26. AfterEnum: false
  27. AfterFunction: false
  28. AfterNamespace: false
  29. AfterObjCDeclaration: false
  30. AfterStruct: false
  31. AfterUnion: false
  32. AfterExternBlock: false
  33. BeforeCatch: false
  34. BeforeElse: false
  35. IndentBraces: false
  36. SplitEmptyFunction: true
  37. SplitEmptyRecord: true
  38. SplitEmptyNamespace: true
  39. BreakBeforeBinaryOperators: None
  40. BreakBeforeBraces: Attach
  41. BreakBeforeInheritanceComma: false
  42. BreakBeforeTernaryOperators: true
  43. BreakConstructorInitializersBeforeComma: false
  44. BreakConstructorInitializers: BeforeColon
  45. BreakAfterJavaFieldAnnotations: false
  46. BreakStringLiterals: true
  47. ColumnLimit: 100
  48. CommentPragmas: '^ IWYU pragma:'
  49. CompactNamespaces: false
  50. ConstructorInitializerAllOnOneLineOrOnePerLine: true
  51. ConstructorInitializerIndentWidth: 4
  52. ContinuationIndentWidth: 4
  53. Cpp11BracedListStyle: true
  54. DerivePointerAlignment: false
  55. DisableFormat: false
  56. ExperimentalAutoDetectBinPacking: false
  57. FixNamespaceComments: true
  58. ForEachMacros:
  59. - foreach
  60. - Q_FOREACH
  61. - BOOST_FOREACH
  62. IncludeCategories:
  63. - Regex: '^<ext/.*\.h>'
  64. Priority: 2
  65. - Regex: '^<.*\.h>'
  66. Priority: 1
  67. - Regex: '^<.*'
  68. Priority: 2
  69. - Regex: '.*'
  70. Priority: 3
  71. IncludeIsMainRegex: '([-_](test|unittest))?$'
  72. IndentCaseLabels: true
  73. IndentPPDirectives: None
  74. IndentWidth: 2
  75. IndentWrappedFunctionNames: false
  76. JavaScriptQuotes: Leave
  77. JavaScriptWrapImports: true
  78. KeepEmptyLinesAtTheStartOfBlocks: false
  79. MacroBlockBegin: ''
  80. MacroBlockEnd: ''
  81. MaxEmptyLinesToKeep: 1
  82. NamespaceIndentation: None
  83. ObjCBlockIndentWidth: 2
  84. ObjCSpaceAfterProperty: false
  85. ObjCSpaceBeforeProtocolList: false
  86. PenaltyBreakAssignment: 2
  87. PenaltyBreakBeforeFirstCallParameter: 1
  88. PenaltyBreakComment: 300
  89. PenaltyBreakFirstLessLess: 100
  90. PenaltyBreakString: 1000
  91. PenaltyExcessCharacter: 1000000
  92. PenaltyReturnTypeOnItsOwnLine: 200
  93. PointerAlignment: Left
  94. RawStringFormats:
  95. - Delimiter: pb
  96. Language: TextProto
  97. BasedOnStyle: google
  98. ReflowComments: true
  99. SortIncludes: false
  100. SortUsingDeclarations: true
  101. SpaceAfterCStyleCast: false
  102. SpaceAfterTemplateKeyword: true
  103. SpaceBeforeAssignmentOperators: true
  104. SpaceBeforeParens: ControlStatements
  105. SpaceInEmptyParentheses: false
  106. SpacesBeforeTrailingComments: 2
  107. SpacesInAngles: false
  108. SpacesInContainerLiterals: true
  109. SpacesInCStyleCastParentheses: false
  110. SpacesInParentheses: false
  111. SpacesInSquareBrackets: false
  112. Standard: Auto
  113. TabWidth: 2
  114. UseTab: Never
  115. ...