FSFW Update #26
7
.clang-format
Normal file
7
.clang-format
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
---
|
||||||
|
BasedOnStyle: Google
|
||||||
|
IndentWidth: 2
|
||||||
|
---
|
||||||
|
Language: Cpp
|
||||||
|
ColumnLimit: 100
|
||||||
|
---
|
@ -107,6 +107,12 @@ cmake --build . -- fsfw-tests_coverage -j
|
|||||||
|
|
||||||
The `coverage.py` script located in the `script` folder can also be used to do this conveniently.
|
The `coverage.py` script located in the `script` folder can also be used to do this conveniently.
|
||||||
|
|
||||||
|
## Formatting the sources
|
||||||
|
|
||||||
|
The formatting is done by the `clang-format` tool. The configuration is contained within the
|
||||||
|
`.clang-format` file in the repository root. As long as `clang-format` is installed, you
|
||||||
|
can run the `apply-clang-format.sh` helper script to format all source files consistently.
|
||||||
|
|
||||||
## Index
|
## Index
|
||||||
|
|
||||||
[1. High-level overview](docs/README-highlevel.md#top) <br>
|
[1. High-level overview](docs/README-highlevel.md#top) <br>
|
||||||
|
8
scripts/apply-clang-format.sh
Executable file
8
scripts/apply-clang-format.sh
Executable file
@ -0,0 +1,8 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
if [[ ! -f README.md ]]; then
|
||||||
|
cd ..
|
||||||
|
fi
|
||||||
|
|
||||||
|
find ./src -iname *.h -o -iname *.cpp -o -iname *.c | xargs clang-format --style=file -i
|
||||||
|
find ./hal -iname *.h -o -iname *.cpp -o -iname *.c | xargs clang-format --style=file -i
|
||||||
|
find ./tests -iname *.h -o -iname *.cpp -o -iname *.c | xargs clang-format --style=file -i
|
Loading…
Reference in New Issue
Block a user