Skip to content

Commit 13e0039

Browse files
committed
Add clang-formatting
1 parent 88db44b commit 13e0039

File tree

2 files changed

+16
-0
lines changed

2 files changed

+16
-0
lines changed

.clang-format

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
---
2+
Language: Cpp
3+
BasedOnStyle: LLVM
4+
IndentWidth: 4
5+
AlignAfterOpenBracket: Align
6+
AllowShortBlocksOnASingleLine: false
7+
AllowShortCaseLabelsOnASingleLine: false
8+
AllowShortFunctionsOnASingleLine: false
9+
IndentCaseLabels: true
10+
SpacesBeforeTrailingComments: 2
11+
PointerAlignment: Left
12+
AlignEscapedNewlines: Left
13+
ForEachMacros: ['TEST_GROUP', 'TEST']
14+
...

.gitlab-ci.yml

+2
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ syntax_check:
1919
# For performance and stability reasons, use offline installation.
2020
- pip install --no-index --find-links=/pip editorconfig-checker
2121
- pip install flake8
22+
- apt-get update && apt-get install -yq clang-format-6.0
2223
script:
2324
- editorconfig-checker
2425
- flake8
26+
- find . -type f -iregex ".*\.\(c\|h\|cpp\|ino\)" -exec clang-format-6.0 -i -style=file {} \;

0 commit comments

Comments
 (0)