.clang-format 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127
  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 6.0.1).
  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. # AfterExternBlock: false
  36. # BeforeCatch: false
  37. # BeforeElse: false
  38. # IndentBraces: false
  39. # SplitEmptyFunction: true
  40. # SplitEmptyRecord: true
  41. # SplitEmptyNamespace: true
  42. # BreakBeforeBinaryOperators: None
  43. # BreakBeforeBraces: Attach
  44. # BreakBeforeInheritanceComma: false
  45. BreakBeforeTernaryOperators: false
  46. # BreakConstructorInitializersBeforeComma: false
  47. BreakConstructorInitializers: AfterColon
  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. # IncludeBlocks: Preserve
  65. IncludeCategories:
  66. - Regex: '".*"'
  67. Priority: 1
  68. - Regex: '^<.*\.h>'
  69. Priority: 2
  70. - Regex: '^<.*'
  71. Priority: 3
  72. # IncludeIsMainRegex: '(Test)?$'
  73. IndentCaseLabels: true
  74. # IndentPPDirectives: None
  75. IndentWidth: 4
  76. # IndentWrappedFunctionNames: false
  77. # JavaScriptQuotes: Leave
  78. # JavaScriptWrapImports: true
  79. # KeepEmptyLinesAtTheStartOfBlocks: true
  80. # MacroBlockBegin: ''
  81. # MacroBlockEnd: ''
  82. # MaxEmptyLinesToKeep: 1
  83. # NamespaceIndentation: None
  84. # PenaltyBreakAssignment: 2
  85. # PenaltyBreakBeforeFirstCallParameter: 19
  86. # PenaltyBreakComment: 300
  87. # PenaltyBreakFirstLessLess: 120
  88. # PenaltyBreakString: 1000
  89. # PenaltyExcessCharacter: 1000000
  90. # PenaltyReturnTypeOnItsOwnLine: 60
  91. # PointerAlignment: Right
  92. # RawStringFormats:
  93. # - Delimiter: pb
  94. # Language: TextProto
  95. # BasedOnStyle: google
  96. # ReflowComments: true
  97. # SortIncludes: true
  98. # SortUsingDeclarations: true
  99. # SpaceAfterCStyleCast: false
  100. # SpaceAfterTemplateKeyword: true
  101. # SpaceBeforeAssignmentOperators: true
  102. # SpaceBeforeParens: ControlStatements
  103. # SpaceInEmptyParentheses: false
  104. # SpacesBeforeTrailingComments: 1
  105. # SpacesInAngles: false
  106. # SpacesInContainerLiterals: true
  107. # SpacesInCStyleCastParentheses: false
  108. # SpacesInParentheses: false
  109. # SpacesInSquareBrackets: false
  110. TabWidth: 4
  111. UseTab: Always
  112. ---
  113. ### C++ specific config ###
  114. Language: Cpp
  115. Standard: Cpp03
  116. ---
  117. ### ObjC specific config ###
  118. Language: ObjC
  119. ObjCBlockIndentWidth: 4
  120. # ObjCSpaceAfterProperty: false
  121. # ObjCSpaceBeforeProtocolList: true
  122. ---
  123. ### Java specific config ###
  124. Language: Java
  125. # BreakAfterJavaFieldAnnotations: false
  126. ...