Added formatting scripts
1. Added .clang-format file which contains information for the clang-format tool on how to format source files 2. Added shell helper script to apply all changes on HAL soures, test sources and primary sources The shell script was not applied yet. This should be done shortly before introducing the release. Also, it might be good idea to provide instructions on how to set up the formatter for Eclipse
This commit is contained in:
parent
bf31248a50
commit
fd7581f8ba
7
.clang-format
Normal file
7
.clang-format
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
---
|
||||||
|
BasedOnStyle: Google
|
||||||
|
IndentWidth: 2
|
||||||
|
---
|
||||||
|
Language: Cpp
|
||||||
|
ColumnWidth: 100
|
||||||
|
---
|
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 | xargs clang-format --style=file -i
|
||||||
|
find ./hal -iname *.h -o -iname *.cpp | xargs clang-format --style=file -i
|
||||||
|
find ./tests -iname *.h -o -iname *.cpp | xargs clang-format --style=file -i
|
Loading…
Reference in New Issue
Block a user