.clang-format 2.6 KB

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