Skip to content

Commit eeaa933

Browse files
committed
Add clang-format config
1 parent 14379bd commit eeaa933

File tree

3 files changed

+20
-78
lines changed

3 files changed

+20
-78
lines changed

.clang-format

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
BasedOnStyle: LLVM
2+
IndentWidth: 4
3+
BinPackArguments: false
4+
BinPackParameters: false
5+
IndentCaseLabels: true

.uncrustify.cfg

Lines changed: 0 additions & 78 deletions
This file was deleted.

dev-bin/clang-format-all.sh

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
#!/bin/sh
2+
3+
format="clang-format -i -style=file"
4+
5+
for dir in extension; do
6+
c_files=`find $dir -maxdepth 1 -name '*.c'`
7+
if [ "$c_files" != "" ]; then
8+
$format $dir/*.c;
9+
fi
10+
11+
h_files=`find $dir -maxdepth 1 -name '*.h'`
12+
if [ "$h_files" != "" ]; then
13+
$format $dir/*.h;
14+
fi
15+
done

0 commit comments

Comments
 (0)