CI: better checking of formatting
This commit is contained in:
parent
d60dc07e10
commit
f3062464d2
@ -28,7 +28,4 @@ steps:
|
|||||||
image: cppbuilder:v0.4
|
image: cppbuilder:v0.4
|
||||||
commands:
|
commands:
|
||||||
- cd mario
|
- cd mario
|
||||||
- FORMAT="ok"
|
- find . -path "./build" -prune -or \( -iname "*.cpp" -or -iname "*.hpp" \) | xargs -P0 -I{} clang-format -style=file --dry-run -Werror {}
|
||||||
- while read f ; do clang-format -style=file "$f" > temp.pp ; if [ $(diff temp.pp "$f" | wc -l) -gt 0 ] ; then echo "$f needs reformatting" ; FORMAT="nok" ; fi ; done <<< "$(find . -iname '*pp')"
|
|
||||||
- rm temp.pp
|
|
||||||
- if [ "$FORMAT" == "nok" ] ; then exit 1 ; fi
|
|
||||||
|
Loading…
Reference in New Issue
Block a user