.clang-format 3.4 KB

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