.clang-format 1.0 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. # The following tries to match the current code style, is imperfect for now
  2. # but good for new codes be added
  3. IndentWidth: 2
  4. TabWidth: 8
  5. UseTab: Always
  6. SpaceBeforeParens: Always
  7. AllowShortLoopsOnASingleLine: true
  8. BreakBeforeBraces: Custom
  9. BraceWrapping:
  10. AfterEnum: true
  11. AfterStruct: false
  12. SplitEmptyFunction: false
  13. AfterClass: true
  14. AfterControlStatement: true
  15. AfterEnum: false
  16. AfterFunction: true
  17. AfterNamespace: false
  18. AfterStruct: true
  19. AfterUnion: true
  20. BeforeElse: true
  21. AlwaysBreakTemplateDeclarations: true
  22. AlignTrailingComments: true
  23. AlignEscapedNewlines: Left
  24. AllowShortBlocksOnASingleLine: true
  25. SpaceAfterCStyleCast: true
  26. AlwaysBreakAfterDefinitionReturnType: TopLevel
  27. BinPackParameters: false
  28. AllowShortFunctionsOnASingleLine: Inline
  29. AccessModifierOffset: 0
  30. AlignTrailingComments: true
  31. AllowShortIfStatementsOnASingleLine: true
  32. AlignAfterOpenBracket: Align
  33. AlignOperands: true
  34. AllowShortCaseLabelsOnASingleLine: true
  35. # We like to have this only for function parameters and structs fields, not always
  36. # AlignConsecutiveDeclarations: true