CI: better checking of formatting
This commit is contained in:
parent
d60dc07e10
commit
f3062464d2
@ -28,7 +28,4 @@ steps:
|
||||
image: cppbuilder:v0.4
|
||||
commands:
|
||||
- cd mario
|
||||
- FORMAT="ok"
|
||||
- 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
|
||||
- find . -path "./build" -prune -or \( -iname "*.cpp" -or -iname "*.hpp" \) | xargs -P0 -I{} clang-format -style=file --dry-run -Werror {}
|
||||
|
Loading…
Reference in New Issue
Block a user