.clang-format 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121
  1. # Commented out parameters are those with the same value as base LLVM style
  2. # We can uncomment them if we want to change their value, or enforce the
  3. # chosen value in case the base style changes (last sync: Clang 5.0.0).
  4. ---
  5. ### General config, applies to all languages ###
  6. BasedOnStyle: LLVM
  7. AccessModifierOffset: -4
  8. AlignAfterOpenBracket: DontAlign
  9. # AlignConsecutiveAssignments: false
  10. # AlignConsecutiveDeclarations: false
  11. # AlignEscapedNewlines: Right
  12. # AlignOperands: true
  13. AlignTrailingComments: false
  14. AllowAllParametersOfDeclarationOnNextLine: false
  15. # AllowShortBlocksOnASingleLine: false
  16. AllowShortCaseLabelsOnASingleLine: true
  17. AllowShortFunctionsOnASingleLine: Inline
  18. AllowShortIfStatementsOnASingleLine: true
  19. # AllowShortLoopsOnASingleLine: false
  20. # AlwaysBreakAfterDefinitionReturnType: None
  21. # AlwaysBreakAfterReturnType: None
  22. # AlwaysBreakBeforeMultilineStrings: false
  23. # AlwaysBreakTemplateDeclarations: false
  24. # BinPackArguments: true
  25. # BinPackParameters: true
  26. # BraceWrapping:
  27. # AfterClass: false
  28. # AfterControlStatement: false
  29. # AfterEnum: false
  30. # AfterFunction: false
  31. # AfterNamespace: false
  32. # AfterObjCDeclaration: false
  33. # AfterStruct: false
  34. # AfterUnion: false
  35. # BeforeCatch: false
  36. # BeforeElse: false
  37. # IndentBraces: false
  38. # SplitEmptyFunction: true
  39. # SplitEmptyRecord: true
  40. # SplitEmptyNamespace: true
  41. # BreakBeforeBinaryOperators: None
  42. # BreakBeforeBraces: Attach
  43. # BreakBeforeInheritanceComma: false
  44. BreakBeforeTernaryOperators: false
  45. # BreakConstructorInitializersBeforeComma: false
  46. BreakConstructorInitializers: AfterColon
  47. # BreakAfterJavaFieldAnnotations: false
  48. # BreakStringLiterals: true
  49. ColumnLimit: 0
  50. # CommentPragmas: '^ IWYU pragma:'
  51. # CompactNamespaces: false
  52. ConstructorInitializerAllOnOneLineOrOnePerLine: true
  53. ConstructorInitializerIndentWidth: 8
  54. ContinuationIndentWidth: 8
  55. Cpp11BracedListStyle: false
  56. # DerivePointerAlignment: false
  57. # DisableFormat: false
  58. # ExperimentalAutoDetectBinPacking: false
  59. # FixNamespaceComments: true
  60. # ForEachMacros:
  61. # - foreach
  62. # - Q_FOREACH
  63. # - BOOST_FOREACH
  64. IncludeCategories:
  65. - Regex: '".*"'
  66. Priority: 1
  67. - Regex: '^<.*\.h>'
  68. Priority: 2
  69. - Regex: '^<.*'
  70. Priority: 3
  71. # IncludeIsMainRegex: '(Test)?$'
  72. IndentCaseLabels: true
  73. IndentWidth: 4
  74. # IndentWrappedFunctionNames: false
  75. # JavaScriptQuotes: Leave
  76. # JavaScriptWrapImports: true
  77. # KeepEmptyLinesAtTheStartOfBlocks: true
  78. # MacroBlockBegin: ''
  79. # MacroBlockEnd: ''
  80. # MaxEmptyLinesToKeep: 1
  81. # NamespaceIndentation: None
  82. # PenaltyBreakAssignment: 2
  83. # PenaltyBreakBeforeFirstCallParameter: 19
  84. # PenaltyBreakComment: 300
  85. # PenaltyBreakFirstLessLess: 120
  86. # PenaltyBreakString: 1000
  87. # PenaltyExcessCharacter: 1000000
  88. # PenaltyReturnTypeOnItsOwnLine: 60
  89. # PointerAlignment: Right
  90. # ReflowComments: true
  91. # SortIncludes: true
  92. # SortUsingDeclarations: true
  93. # SpaceAfterCStyleCast: false
  94. # SpaceAfterTemplateKeyword: true
  95. # SpaceBeforeAssignmentOperators: true
  96. # SpaceBeforeParens: ControlStatements
  97. # SpaceInEmptyParentheses: false
  98. # SpacesBeforeTrailingComments: 1
  99. # SpacesInAngles: false
  100. # SpacesInContainerLiterals: true
  101. # SpacesInCStyleCastParentheses: false
  102. # SpacesInParentheses: false
  103. # SpacesInSquareBrackets: false
  104. TabWidth: 4
  105. UseTab: Always
  106. ---
  107. ### C++ specific config ###
  108. Language: Cpp
  109. Standard: Cpp03
  110. ---
  111. ### ObjC specific config ###
  112. Language: ObjC
  113. ObjCBlockIndentWidth: 4
  114. # ObjCSpaceAfterProperty: false
  115. # ObjCSpaceBeforeProtocolList: true
  116. ---
  117. ### Java specific config ###
  118. Language: Java
  119. # BreakAfterJavaFieldAnnotations: false
  120. ...