.clang-format 2.6 KB

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