File tree Expand file tree Collapse file tree 2 files changed +24
-3
lines changed Expand file tree Collapse file tree 2 files changed +24
-3
lines changed Original file line number Diff line number Diff line change @@ -46,7 +46,6 @@ DerivePointerAlignment: false
46
46
DisableFormat : false
47
47
ExperimentalAutoDetectBinPacking : false
48
48
ForEachMacros : []
49
- IncludeBlocks : Preserve
50
49
IncludeCategories :
51
50
- Regex : ' ^"(llvm|llvm-c|clang|clang-c)/'
52
51
Priority : 2
@@ -55,7 +54,6 @@ IncludeCategories:
55
54
- Regex : ' .*'
56
55
Priority : 1
57
56
IndentCaseLabels : true
58
- IndentPPDirectives : None
59
57
IndentWidth : 4
60
58
IndentWrappedFunctionNames : false
61
59
KeepEmptyLinesAtTheStartOfBlocks : true
Original file line number Diff line number Diff line change @@ -12,6 +12,29 @@ if test x"$1" = xchanged; then
12
12
FILES=" $FILES1 $FILES2 $FILES3 "
13
13
fi
14
14
15
+ # Find clang-format, we prefer -6.0, but also allow binaries without -suffix as
16
+ # long as they're 6.0.0
17
+ CLANG_FORMAT=
18
+
19
+ which clang-format-6.0
20
+ if [ $? = 0 ]; then
21
+ CLANG_FORMAT=` which clang-format-6.0`
22
+ fi
23
+
24
+ which clang-format
25
+ if [ $? = 0 ]; then
26
+ VERSION=` clang-format -version | cut -d " " -f 3 | cut -c 1-3`
27
+ if [ x" $VERSION " = " x6.0" ]; then
28
+ CLANG_FORMAT=` which clang-format`
29
+ fi
30
+ fi
31
+
32
+ if [ x" $CLANG_FORMAT " = " x" ]; then
33
+ echo " Couldn't find the right clang-format (needs version 6.0)"
34
+ exit
35
+ fi
36
+
37
+ # Run formatter
15
38
for i in $FILES ; do
16
- clang-format-7 -i $i
39
+ $CLANG_FORMAT -i $i
17
40
done
You can’t perform that action at this time.
0 commit comments