.clang-format 2.8KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  1. ---
  2. Language: Cpp
  3. # BasedOnStyle: LLVM
  4. # should be in line with IndentWidth
  5. AccessModifierOffset: -4
  6. AlignAfterOpenBracket: Align
  7. AlignConsecutiveAssignments: false
  8. AlignConsecutiveDeclarations: false
  9. AlignEscapedNewlinesLeft: false
  10. AlignOperands: true
  11. AlignTrailingComments: true
  12. AllowAllParametersOfDeclarationOnNextLine: true
  13. AllowShortBlocksOnASingleLine: false
  14. AllowShortCaseLabelsOnASingleLine: false
  15. AllowShortFunctionsOnASingleLine: All
  16. AllowShortIfStatementsOnASingleLine: true
  17. AllowShortLoopsOnASingleLine: true
  18. AlwaysBreakAfterDefinitionReturnType: None
  19. AlwaysBreakAfterReturnType: None
  20. AlwaysBreakBeforeMultilineStrings: false
  21. AlwaysBreakTemplateDeclarations: false
  22. BinPackArguments: true
  23. BinPackParameters: true
  24. BraceWrapping:
  25. AfterClass: false
  26. AfterControlStatement: false
  27. AfterEnum: false
  28. AfterFunction: false
  29. AfterNamespace: false
  30. AfterObjCDeclaration: false
  31. AfterStruct: false
  32. AfterUnion: false
  33. BeforeCatch: false
  34. BeforeElse: false
  35. IndentBraces: false
  36. BreakBeforeBinaryOperators: None
  37. BreakBeforeBraces: Attach
  38. BreakBeforeTernaryOperators: true
  39. BreakConstructorInitializersBeforeComma: true
  40. BreakAfterJavaFieldAnnotations: false
  41. BreakStringLiterals: true
  42. ColumnLimit: 120
  43. CommentPragmas: '^ IWYU pragma:'
  44. ConstructorInitializerAllOnOneLineOrOnePerLine: false
  45. ConstructorInitializerIndentWidth: 0
  46. ContinuationIndentWidth: 4
  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. IncludeIsMainRegex: '$'
  60. IndentCaseLabels: false
  61. IndentWidth: 4
  62. IndentWrappedFunctionNames: false
  63. JavaScriptQuotes: Leave
  64. JavaScriptWrapImports: true
  65. KeepEmptyLinesAtTheStartOfBlocks: true
  66. MacroBlockBegin: ''
  67. MacroBlockEnd: ''
  68. MaxEmptyLinesToKeep: 1
  69. NamespaceIndentation: None
  70. ObjCBlockIndentWidth: 2
  71. ObjCSpaceAfterProperty: false
  72. ObjCSpaceBeforeProtocolList: true
  73. PenaltyBreakBeforeFirstCallParameter: 19
  74. PenaltyBreakComment: 300
  75. PenaltyBreakFirstLessLess: 120
  76. PenaltyBreakString: 1000
  77. PenaltyExcessCharacter: 1000000
  78. PenaltyReturnTypeOnItsOwnLine: 60
  79. PointerAlignment: Right
  80. ReflowComments: true
  81. SortIncludes: true
  82. SpaceAfterCStyleCast: false
  83. SpaceAfterTemplateKeyword: true
  84. SpaceBeforeAssignmentOperators: true
  85. SpaceBeforeParens: ControlStatements
  86. SpaceInEmptyParentheses: false
  87. SpacesBeforeTrailingComments: 1
  88. SpacesInAngles: false
  89. SpacesInContainerLiterals: true
  90. SpacesInCStyleCastParentheses: false
  91. SpacesInParentheses: false
  92. SpacesInSquareBrackets: false
  93. Standard: Cpp11
  94. TabWidth: 4
  95. UseTab: Never
  96. ...