.clang-format 2.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  1. ---
  2. # Global config for all languages
  3. AccessModifierOffset: -2
  4. AlignAfterOpenBracket: Align
  5. AlignConsecutiveAssignments: false
  6. AlignConsecutiveDeclarations: false
  7. AlignEscapedNewlinesLeft: false
  8. AlignOperands: true
  9. AlignTrailingComments: true
  10. AllowAllParametersOfDeclarationOnNextLine: true
  11. AllowShortBlocksOnASingleLine: false
  12. AllowShortCaseLabelsOnASingleLine: false
  13. AllowShortFunctionsOnASingleLine: InlineOnly
  14. AllowShortIfStatementsOnASingleLine: false
  15. AllowShortLoopsOnASingleLine: false
  16. AlwaysBreakAfterDefinitionReturnType: None
  17. AlwaysBreakAfterReturnType: None
  18. AlwaysBreakBeforeMultilineStrings: false
  19. AlwaysBreakTemplateDeclarations: true
  20. BinPackArguments: true
  21. BinPackParameters: true
  22. BraceWrapping:
  23. AfterCaseLabel: true
  24. AfterClass: true
  25. AfterControlStatement: true
  26. AfterEnum: true
  27. AfterFunction: true
  28. AfterNamespace: true
  29. AfterStruct: true
  30. AfterUnion: true
  31. BeforeCatch: true
  32. BeforeElse: true
  33. IndentBraces: false
  34. BreakBeforeBinaryOperators: None
  35. BreakBeforeBraces: Custom
  36. BreakBeforeTernaryOperators: false
  37. BreakConstructorInitializersBeforeComma: false
  38. ColumnLimit: 100
  39. CommentPragmas: '^ (IWYU pragma:|NOLINT)'
  40. ConstructorInitializerAllOnOneLineOrOnePerLine: false
  41. ConstructorInitializerIndentWidth: 4
  42. ContinuationIndentWidth: 4
  43. Cpp11BracedListStyle: true
  44. DerivePointerAlignment: false
  45. DisableFormat: false
  46. ForEachMacros: []
  47. IncludeCategories:
  48. - Regex: '^<[Ww]indows\.h>$'
  49. Priority: 1
  50. - Regex: '^<'
  51. Priority: 2
  52. - Regex: '^"'
  53. Priority: 3
  54. IndentCaseLabels: false
  55. IndentWidth: 2
  56. IndentWrappedFunctionNames: false
  57. KeepEmptyLinesAtTheStartOfBlocks: false
  58. MacroBlockBegin: ''
  59. MacroBlockEnd: ''
  60. MaxEmptyLinesToKeep: 1
  61. NamespaceIndentation: None
  62. PenaltyBreakBeforeFirstCallParameter: 19
  63. PenaltyBreakComment: 300
  64. PenaltyBreakFirstLessLess: 120
  65. PenaltyBreakString: 1000
  66. PenaltyExcessCharacter: 1000000
  67. PenaltyReturnTypeOnItsOwnLine: 60
  68. PointerAlignment: Left
  69. ReflowComments: true
  70. SortIncludes: true
  71. SpaceAfterCStyleCast: false
  72. SpaceBeforeAssignmentOperators: true
  73. SpaceBeforeParens: ControlStatements
  74. SpaceInEmptyParentheses: false
  75. SpacesBeforeTrailingComments: 2
  76. SpacesInAngles: false
  77. SpacesInContainerLiterals: true
  78. SpacesInCStyleCastParentheses: false
  79. SpacesInParentheses: false
  80. SpacesInSquareBrackets: false
  81. Standard: Latest
  82. TabWidth: 2
  83. UseTab: Never
  84. ---
  85. # C++ Specific Config
  86. Language: Cpp
  87. ---
  88. # Objective-C Specific Config
  89. Language: ObjC
  90. ObjCBlockIndentWidth: 2
  91. ObjCSpaceAfterProperty: false
  92. ObjCSpaceBeforeProtocolList: true
  93. BraceWrapping:
  94. AfterObjCDeclaration: true
  95. ...