mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-07-03 12:03:55 -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
|
shift
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
|
if [[ $1 == -* ]]; then
|
||||||
|
echo "unrecognized option: $1"
|
||||||
|
exit 3
|
||||||
|
fi
|
||||||
BUILDTYPE="$1"
|
BUILDTYPE="$1"
|
||||||
shift
|
shift
|
||||||
;;
|
;;
|
||||||
|
|
@ -45,8 +49,8 @@ done
|
||||||
# Check formatting using clang-format
|
# Check formatting using clang-format
|
||||||
if [[ $CHECK_FORMAT ]]; then
|
if [[ $CHECK_FORMAT ]]; then
|
||||||
echo "Checking your code using clang-format..."
|
echo "Checking your code using clang-format..."
|
||||||
if ! diff="$(./clangify.sh --color-diff --cf-version)"; then
|
if ! diff="$(./clangify.sh --diff --cf-version)"; then
|
||||||
cat <<EOM
|
[[ $? == 1 ]] && cat <<EOM
|
||||||
***********************************************************
|
***********************************************************
|
||||||
*** ***
|
*** ***
|
||||||
*** Your code does not comply with our styleguide. ***
|
*** 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:
|
The following changes should be made:
|
||||||
$diff
|
${diff#*
|
||||||
|
}
|
||||||
|
|
||||||
Exiting...
|
Exiting...
|
||||||
EOM
|
EOM
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue