forked from michele-segata/plexe
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathformat-code.sh
51 lines (51 loc) · 1.46 KB
/
format-code.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
#!/bin/bash
set -e
clang-format --style "{ \
Language: Cpp, \
BasedOnStyle: LLVM, \
AccessModifierOffset: -4, \
AlignAfterOpenBracket: DontAlign, \
AlignOperands: false, \
AlignTrailingComments: false, \
AllowShortBlocksOnASingleLine: false, \
AllowShortFunctionsOnASingleLine: None, \
AllowShortIfStatementsOnASingleLine: true, \
AllowShortLoopsOnASingleLine: true, \
AlwaysBreakTemplateDeclarations: false, \
BreakBeforeBraces: Custom, \
BraceWrapping: { AfterEnum: true, AfterFunction: true, BeforeElse: true }, \
BreakConstructorInitializersBeforeComma: true, \
ColumnLimit: 1000, \
Cpp11BracedListStyle: true, \
IndentWidth: 4, \
PointerAlignment: Left, \
SortIncludes: false, \
SpaceAfterCStyleCast: true, \
Standard: Cpp11, \
TabWidth: 4, \
UseTab: Never \
}" -i "$@"
clang-format --style "{ \
Language: Cpp, \
BasedOnStyle: LLVM, \
AccessModifierOffset: -4, \
AlignAfterOpenBracket: DontAlign, \
AlignOperands: false, \
AlignTrailingComments: false, \
AllowShortBlocksOnASingleLine: false, \
AllowShortFunctionsOnASingleLine: None, \
AllowShortIfStatementsOnASingleLine: true, \
AllowShortLoopsOnASingleLine: true, \
AlwaysBreakTemplateDeclarations: false, \
BreakBeforeBraces: Stroustrup, \
BreakConstructorInitializersBeforeComma: true, \
ColumnLimit: 0, \
Cpp11BracedListStyle: true, \
IndentWidth: 4, \
PointerAlignment: Left, \
SortIncludes: false, \
SpaceAfterCStyleCast: true, \
Standard: Cpp11, \
TabWidth: 4, \
UseTab: Never \
}" -i "$@"