Add code formatting configuration with clang-format

This commit is contained in:
Jan 2023-10-02 23:01:54 +02:00
parent f6204d5bd9
commit 9197b537d7
No known key found for this signature in database
GPG Key ID: 44B581F78FF5C57C
2 changed files with 11 additions and 0 deletions

5
.clang-format Normal file
View File

@ -0,0 +1,5 @@
---
Language: Cpp
BasedOnStyle: LLVM
AlignArrayOfStructures: Left
ColumnLimit: 160

6
scripts/reformat-all.sh Executable file
View File

@ -0,0 +1,6 @@
#!/bin/bash
# Go to repository root
cd "$(dirname "$0")/.." || exit 2
find ./src ./test -iname '*.h' -o -iname '*.cpp' | xargs clang-format -i