File tree 3 files changed +79
-0
lines changed
3 files changed +79
-0
lines changed Original file line number Diff line number Diff line change
1
+ Language : Cpp
2
+
3
+ IndentWidth : 4
4
+ ContinuationIndentWidth : 8
5
+
6
+ ColumnLimit : 120
7
+
8
+ AlignAfterOpenBracket : false
9
+
10
+ AlignConsecutiveAssignments : true
11
+
12
+ # not supported in clang-format-3.7
13
+ # supported in clang-format-3.8 and above
14
+ AlignConsecutiveDeclarations : true
15
+
16
+ AlignTrailingComments : true
17
+
18
+ AllowAllParametersOfDeclarationOnNextLine : true
19
+
20
+ AllowShortBlocksOnASingleLine : false
21
+ AllowShortFunctionsOnASingleLine : false
22
+ AllowShortIfStatementsOnASingleLine : false
23
+ AllowShortLoopsOnASingleLine : false
24
+
25
+ # Control of individual brace wrapping cases
26
+ # not supported in clang-format-3.7
27
+ # supported in clang-format-3.8 and above
28
+ BraceWrapping : {
29
+ AfterClass : ' true'
30
+ AfterControlStatement : ' false'
31
+ AfterEnum : ' true'
32
+ AfterFunction : ' true'
33
+ AfterNamespace : ' true'
34
+ AfterStruct : ' true'
35
+ AfterUnion : ' true'
36
+ BeforeCatch : ' true'
37
+ BeforeElse : ' false'
38
+ IndentBraces : ' false'
39
+ }
40
+
41
+ BreakBeforeBraces : Stroustrup
42
+
43
+ IndentCaseLabels : true
44
+
45
+ KeepEmptyLinesAtTheStartOfBlocks : true
46
+
47
+ MaxEmptyLinesToKeep : 1
48
+
49
+ # Pointer is aligned to right side
50
+ PointerAlignment : Right
51
+
52
+ # High penalty to avoid line break just after return type
53
+ PenaltyReturnTypeOnItsOwnLine : 10000
54
+
55
+ SpaceAfterCStyleCast : true
56
+
57
+ SpacesInParentheses : false
58
+ SpaceInEmptyParentheses : false
59
+ SpaceBeforeParens : ControlStatements
60
+
61
+ UseTab : Never
Original file line number Diff line number Diff line change @@ -8,3 +8,15 @@ ChangeLog:
8
8
AUTHORS : ChangeLog
9
9
( echo " Authors and contributors, in alphabetical order: " ; echo ; \
10
10
sed -r " s/^Author: (.*)/\1/;t;d" $< | sort -u ) > $@
11
+
12
+ if HAVE_CLANG_FORMAT
13
+
14
+ .PHONY : reformat
15
+
16
+ reformat :
17
+ @echo " Reformatting header files..."
18
+ @CLANG_FORMAT@ -style=file -i ` find . -name " *.h" `
19
+ @echo " Reformatting C files..."
20
+ @CLANG_FORMAT@ -style=file -i ` find . -name " *.c" `
21
+
22
+ endif
Original file line number Diff line number Diff line change @@ -5,6 +5,12 @@ AC_CONFIG_SRCDIR([src/igmpproxy.c])
5
5
AC_CONFIG_HEADERS ( [ config.h] )
6
6
AC_PROG_CC_C99
7
7
8
+ AC_CHECK_PROGS (
9
+ [ CLANG_FORMAT] , [ clang-format clang-format-4.0 clang-format-3.9] ,
10
+ [ AC_MSG_ERROR ( [ clang-format was not not found during configure.] ) ]
11
+ )
12
+ AM_CONDITIONAL([ HAVE_CLANG_FORMAT] , [ test -n "$CLANG_FORMAT"] )
13
+
8
14
AC_CANONICAL_HOST
9
15
case $host_os in
10
16
linux*|uclinux*) os=linux;;
You can’t perform that action at this time.
0 commit comments