mirror of https://github.com/zeldaret/tp.git
fix clang-format check
This commit is contained in:
parent
24d529f67b
commit
ff68771d32
|
@ -1,6 +1,6 @@
|
||||||
---
|
---
|
||||||
Language: Cpp
|
Language: Cpp
|
||||||
Standard: c++03
|
Standard: C++03
|
||||||
AccessModifierOffset: -4
|
AccessModifierOffset: -4
|
||||||
AlignAfterOpenBracket: Align
|
AlignAfterOpenBracket: Align
|
||||||
AlignConsecutiveAssignments: false
|
AlignConsecutiveAssignments: false
|
||||||
|
|
|
@ -8,8 +8,8 @@ jobs:
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
- uses: DoozyX/clang-format-lint-action@v0.11
|
- name: Install clang-format
|
||||||
with:
|
run: sudo apt-get install clang-format-10
|
||||||
source: '.'
|
- name: Run clang-format-check
|
||||||
extensions: 'h,cpp'
|
run: sh tools/clang-format-check.sh
|
||||||
clangFormatVersion: 11
|
|
|
@ -0,0 +1,14 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
clangFormatTargets=$(find . -type f -regex '.*\.\(cpp\|hpp\|h\|cc\|cxx\)')
|
||||||
|
|
||||||
|
for inputFile in $clangFormatTargets
|
||||||
|
do
|
||||||
|
clang-format-10 -style=file $inputFile > $inputFile-formatted
|
||||||
|
diff $inputFile $inputFile-formatted
|
||||||
|
if [ $? != 0 ] ; then
|
||||||
|
exit 1
|
||||||
|
else
|
||||||
|
rm $inputFile-formatted
|
||||||
|
fi
|
||||||
|
done
|
Loading…
Reference in New Issue