.clang-format 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119
  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. # BreakStringLiterals: true
  48. ColumnLimit: 0
  49. # CommentPragmas: '^ IWYU pragma:'
  50. # CompactNamespaces: false
  51. ConstructorInitializerAllOnOneLineOrOnePerLine: true
  52. ConstructorInitializerIndentWidth: 8
  53. ContinuationIndentWidth: 8
  54. Cpp11BracedListStyle: false
  55. # DerivePointerAlignment: false
  56. # DisableFormat: false
  57. # ExperimentalAutoDetectBinPacking: false
  58. # FixNamespaceComments: true
  59. # ForEachMacros:
  60. # - foreach
  61. # - Q_FOREACH
  62. # - BOOST_FOREACH
  63. IncludeCategories:
  64. - Regex: '".*"'
  65. Priority: 1
  66. - Regex: '^<.*\.h>'
  67. Priority: 2
  68. - Regex: '^<.*'
  69. Priority: 3
  70. # IncludeIsMainRegex: '(Test)?$'
  71. IndentCaseLabels: true
  72. IndentWidth: 4
  73. # IndentWrappedFunctionNames: false
  74. # JavaScriptQuotes: Leave
  75. # JavaScriptWrapImports: true
  76. # KeepEmptyLinesAtTheStartOfBlocks: true
  77. # MacroBlockBegin: ''
  78. # MacroBlockEnd: ''
  79. # MaxEmptyLinesToKeep: 1
  80. # NamespaceIndentation: None
  81. # PenaltyBreakAssignment: 2
  82. # PenaltyBreakBeforeFirstCallParameter: 19
  83. # PenaltyBreakComment: 300
  84. # PenaltyBreakFirstLessLess: 120
  85. # PenaltyBreakString: 1000
  86. # PenaltyExcessCharacter: 1000000
  87. # PenaltyReturnTypeOnItsOwnLine: 60
  88. # PointerAlignment: Right
  89. # ReflowComments: true
  90. # SortIncludes: true
  91. # SortUsingDeclarations: true
  92. # SpaceAfterCStyleCast: false
  93. # SpaceAfterTemplateKeyword: true
  94. # SpaceBeforeAssignmentOperators: true
  95. # SpaceBeforeParens: ControlStatements
  96. # SpaceInEmptyParentheses: false
  97. # SpacesBeforeTrailingComments: 1
  98. # SpacesInAngles: false
  99. # SpacesInContainerLiterals: true
  100. # SpacesInCStyleCastParentheses: false
  101. # SpacesInParentheses: false
  102. # SpacesInSquareBrackets: false
  103. TabWidth: 4
  104. UseTab: Always
  105. ---
  106. ### C++ specific config ###
  107. Language: Cpp
  108. Standard: Cpp03
  109. ---
  110. ### ObjC specific config ###
  111. Language: ObjC
  112. ObjCBlockIndentWidth: 4
  113. # ObjCSpaceAfterProperty: false
  114. # ObjCSpaceBeforeProtocolList: true
  115. ---
  116. ### Java specific config ###
  117. Language: Java
  118. # BreakAfterJavaFieldAnnotations: false
  119. ...