mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-06-10 00:04:48 -07:00
travis ci format check hotfix (#3449)
* set error message to be conditional #3443 fails on the git merge base for "some reason" but at least this error message should be clearer. * fix issues created earlier in #3433 split version from actual diff remove --color-diff argument as apparently it isn't supported
This commit is contained in:
parent
af2bce7141
commit
ec61d1f012
1 changed files with 12 additions and 3 deletions
|
|
@ -36,6 +36,10 @@ while [[ "$@" ]]; do
|
|||
shift
|
||||
;;
|
||||
*)
|
||||
if [[ $1 == -* ]]; then
|
||||
echo "unrecognized option: $1"
|
||||
exit 3
|
||||
fi
|
||||
BUILDTYPE="$1"
|
||||
shift
|
||||
;;
|
||||
|
|
@ -45,8 +49,8 @@ done
|
|||
# Check formatting using clang-format
|
||||
if [[ $CHECK_FORMAT ]]; then
|
||||
echo "Checking your code using clang-format..."
|
||||
if ! diff="$(./clangify.sh --color-diff --cf-version)"; then
|
||||
cat <<EOM
|
||||
if ! diff="$(./clangify.sh --diff --cf-version)"; then
|
||||
[[ $? == 1 ]] && cat <<EOM
|
||||
***********************************************************
|
||||
*** ***
|
||||
*** Your code does not comply with our styleguide. ***
|
||||
|
|
@ -59,8 +63,13 @@ if [[ $CHECK_FORMAT ]]; then
|
|||
*** ***
|
||||
***********************************************************
|
||||
|
||||
Used clang-format version:
|
||||
${diff%%
|
||||
*}
|
||||
|
||||
The following changes should be made:
|
||||
$diff
|
||||
${diff#*
|
||||
}
|
||||
|
||||
Exiting...
|
||||
EOM
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue