Ingen beskrivning

.clang-format 3.2KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122
  1. Language: Cpp
  2. # Access modifiers in the middle
  3. AccessModifierOffset: -2
  4. # Align escaped newlines as far left as possible
  5. AlignEscapedNewlinesLeft: true
  6. # Align all trailing comments
  7. AlignTrailingComments: true
  8. # Don't allow parameters to be placed on the next line, even though BinPackParameters is false
  9. AllowAllParametersOfDeclarationOnNextLine: false
  10. # Do not allow short functions/if statements/loops on a single line
  11. AllowShortFunctionsOnASingleLine: false
  12. AllowShortIfStatementsOnASingleLine: false
  13. AllowShortLoopsOnASingleLine: false
  14. # Don't force breaks before multiline strings
  15. AlwaysBreakBeforeMultilineStrings: false
  16. # Don't force breaks before template declarations
  17. AlwaysBreakTemplateDeclarations: false
  18. # Force breaks after definition return type
  19. AlwaysBreakAfterDefinitionReturnType: true
  20. # Arguments and parameters are either on one line or on one line each
  21. BinPackArguments: false
  22. BinPackParameters: false
  23. # Do not break before binary operators
  24. BreakBeforeBinaryOperators: None
  25. # Use the linux brace breaking style: Attach braces to context except for braces on functions,
  26. # namespaces and class definitions
  27. BreakBeforeBraces: Linux
  28. # Do not place ternary operators after line breaks
  29. BreakBeforeTernaryOperators: false
  30. # In the constructor initializers do not align the comma with the colon
  31. BreakConstructorInitializersBeforeComma: false
  32. # Force columns to be less than 100 characters
  33. ColumnLimit: 100
  34. # Constructor initializer all in one line or all on their own line
  35. ConstructorInitializerAllOnOneLineOrOnePerLine: true
  36. # Indent constructor initializers
  37. ConstructorInitializerIndentWidth: 8
  38. # Do not indent continuations
  39. ContinuationIndentWidth: 0
  40. # Do not use braced lists in c++11 style
  41. Cpp11BracedListStyle: false
  42. # Do not derive pointer alignment
  43. DerivePointerAlignment: false
  44. # Case labes are indented
  45. IndentCaseLabels: true
  46. # Do not indent function declarations
  47. IndentFunctionDeclarationAfterType: false
  48. # Indentation is 4 characters
  49. IndentWidth: 4
  50. # Do not keep empty lines at start of blocks
  51. KeepEmptyLinesAtTheStartOfBlocks: false
  52. # Keep at most 2 consecutive empty lines
  53. MaxEmptyLinesToKeep: 2
  54. # Do not indent namespaces
  55. NamespaceIndentation: None
  56. # Spaces for ObjC properties and protocol lists
  57. ObjCSpaceAfterProperty: true
  58. ObjCSpaceBeforeProtocolList: true
  59. # Penalties
  60. PenaltyBreakBeforeFirstCallParameter: 100
  61. PenaltyBreakComment: 10
  62. PenaltyBreakFirstLessLess: 0
  63. PenaltyBreakString: 100
  64. PenaltyExcessCharacter: 20
  65. PenaltyReturnTypeOnItsOwnLine: 20
  66. # Force pointers to typename (i.e. char* a instead of char *a)
  67. PointerAlignment: Left
  68. # Spaces after C-style casts and before assignments
  69. SpaceAfterCStyleCast: true
  70. SpaceBeforeAssignmentOperators: true
  71. # Only space before parentheses if they are control statements
  72. SpaceBeforeParens: ControlStatements
  73. # Single space before trailing comments
  74. SpacesBeforeTrailingComments: 1
  75. # No spaces in parentheses, angles, or square brackets
  76. SpaceInEmptyParentheses: false
  77. SpacesInAngles: false
  78. SpacesInCStyleCastParentheses: false
  79. SpacesInParentheses: false
  80. SpacesInSquareBrackets: false
  81. # Use c++11 as the language standard
  82. Standard: Cpp11
  83. # Tabs are 4 characters wide
  84. TabWidth: 4
  85. # Don't use tabs for indentation :-(
  86. UseTab: Never