Clang-Format code

Download clang-format from http://llvm.org.

Examples:

clang-format -style=LLVM -i test.c
clang-format -style=Google -dump-config > google.clang-format

You can use your own .clang-format or _clang-format configuration file.

---
BasedOnStyle: LLVM
---
Language: Cpp
AccessModifierOffset: -4
AlignEscapedNewlines: Left
AllowShortIfStatementsOnASingleLine: true
AllowShortLoopsOnASingleLine: true
BreakBeforeBraces: Custom
BraceWrapping:
  AfterFunction: true
ColumnLimit: 0
ConstructorInitializerAllOnOneLineOrOnePerLine: true
IncludeCategories:
  - Regex:    '^<ext/.*\.h>'
    Priority: 2
  - Regex:    '^<.*\.h>'
    Priority: 1
  - Regex:    '^<.*'
    Priority: 2
  - Regex:    '.*'
    Priority: 3
IndentCaseLabels: true
IndentWidth: 4
ObjCBlockIndentWidth: 4
SortIncludes: false
SortUsingDeclarations: false
SpacesBeforeTrailingComments: 2
UseTab: Never
TabWidth: 4
---
Language: Java
...


Contents

0