added .clang format script
Some checks failed
EIVE/eive-obsw/pipeline/head There was a failure building this commit

This commit is contained in:
Robin Müller 2022-01-17 13:12:33 +01:00
parent 969251d9fa
commit 2207d06058
No known key found for this signature in database
GPG Key ID: 11D4952C8CCEF814
2 changed files with 19 additions and 0 deletions

8
.clang-format Normal file
View File

@ -0,0 +1,8 @@
---
BasedOnStyle: Google
IndentWidth: 2
---
Language: Cpp
ColumnLimit: 100
ReflowComments: true
---

11
apply-clang-format.sh Executable file
View File

@ -0,0 +1,11 @@
#!/bin/bash
if [[ ! -f README.md ]]; then
cd ..
fi
find ./mission -iname *.h o -iname *.cpp -o -iname *.c | xargs clang-format --style=file -i
find ./linux -iname *.h -o -iname *.cpp -o -iname *.c | xargs clang-format --style=file -i
find ./bsp_q7s -iname *.h -o -iname *.cpp -o -iname *.c | xargs clang-format --style=file -i
find ./bsp_linux_board -iname *.h -o -iname *.cpp -o -iname *.c | xargs clang-format --style=file -i
find ./bsp_hosted -iname *.h -o -iname *.cpp -o -iname *.c | xargs clang-format --style=file -i
find ./test -iname *.h -o -iname *.cpp -o -iname *.c | xargs clang-format --style=file -i