Add a script to run clang-format on all source files

This commit is contained in:
apio 2022-11-08 19:07:16 +01:00
parent 327b60566c
commit 0c1ffedd3f

15
tools/run-clang-format.sh Executable file
View 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