Add a script to run clang-format on all source files
This commit is contained in:
parent
327b60566c
commit
0c1ffedd3f
15
tools/run-clang-format.sh
Executable file
15
tools/run-clang-format.sh
Executable file
@ -0,0 +1,15 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
set -e
|
||||||
|
source $(dirname $0)/env.sh
|
||||||
|
|
||||||
|
cd $LUNA_ROOT
|
||||||
|
|
||||||
|
SOURCES=($(find kernel/src -type f | grep "\.c") $(find kernel/include -type f))
|
||||||
|
SOURCES+=($(find libs/libc/src -type f | grep "\.c") $(find libs/libc/include -type f))
|
||||||
|
SOURCES+=($(find apps/src -type f))
|
||||||
|
|
||||||
|
for f in ${SOURCES[@]}
|
||||||
|
do
|
||||||
|
clang-format $f -i
|
||||||
|
done
|
Loading…
Reference in New Issue
Block a user