From 975b3cd294dab45c213acfdee3592ab5fbb305e3 Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Mon, 17 Jan 2022 15:57:52 +0100 Subject: [PATCH] added clang script and forward declarations --- .clang-format | 8 ++++++++ bsp_q7s/boardtest/Q7STestTask.h | 2 ++ mission/tmtc/VirtualChannel.h | 2 ++ scripts/apply-clang-format.sh | 11 +++++++++++ 4 files changed, 23 insertions(+) create mode 100644 .clang-format create mode 100755 scripts/apply-clang-format.sh diff --git a/.clang-format b/.clang-format new file mode 100644 index 00000000..ada61da2 --- /dev/null +++ b/.clang-format @@ -0,0 +1,8 @@ +--- +BasedOnStyle: Google +IndentWidth: 2 +--- +Language: Cpp +ColumnLimit: 100 +ReflowComments: true +--- diff --git a/bsp_q7s/boardtest/Q7STestTask.h b/bsp_q7s/boardtest/Q7STestTask.h index 91e8c3d6..631c238a 100644 --- a/bsp_q7s/boardtest/Q7STestTask.h +++ b/bsp_q7s/boardtest/Q7STestTask.h @@ -3,6 +3,8 @@ #include "test/testtasks/TestTask.h" +class CoreController; + class Q7STestTask: public TestTask { public: Q7STestTask(object_id_t objectId); diff --git a/mission/tmtc/VirtualChannel.h b/mission/tmtc/VirtualChannel.h index c6e2eb6d..213a3421 100644 --- a/mission/tmtc/VirtualChannel.h +++ b/mission/tmtc/VirtualChannel.h @@ -7,6 +7,8 @@ #include #include +class StorageManagerIF; + /** * @brief This class represents a virtual channel. Sending a tm message to an object of this class * will forward the tm packet to the respective virtual channel of the PTME IP Core. diff --git a/scripts/apply-clang-format.sh b/scripts/apply-clang-format.sh new file mode 100755 index 00000000..55a31487 --- /dev/null +++ b/scripts/apply-clang-format.sh @@ -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