diff options
author | Loïc Blot <nerzhul@users.noreply.github.com> | 2017-03-26 11:29:21 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-03-26 11:29:21 +0200 |
commit | aa5549ecc33606f786c8cef433e0dbe9188f3ede (patch) | |
tree | 80b6a6e8df079159c5477919d667e8180acca37f | |
parent | 1139a18c3a28b99de481f3187f88981be4492ead (diff) | |
download | minetest-aa5549ecc33606f786c8cef433e0dbe9188f3ede.tar.gz minetest-aa5549ecc33606f786c8cef433e0dbe9188f3ede.tar.bz2 minetest-aa5549ecc33606f786c8cef433e0dbe9188f3ede.zip |
clang-format: limit diff to 50 files to prevent exceding the maximum travis output (4MB) (#5455)
-rwxr-xr-x | util/travis/script.sh | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/util/travis/script.sh b/util/travis/script.sh index 557822e1f..ab524b4b4 100755 --- a/util/travis/script.sh +++ b/util/travis/script.sh @@ -13,11 +13,18 @@ function perform_lint() { files_to_lint="$(find src/ -name '*.cpp' -or -name '*.h' | egrep -v '^src/(gmp|lua|jsoncpp)/')" fi + local errorcount=0 local fail=0 for f in ${files_to_lint}; do d=$(diff -u "$f" <(${CLANG_FORMAT} "$f") || true) if ! [ -z "$d" ]; then + ((errorcount++)) printf "The file %s is not compliant with the coding style:\n%s\n" "$f" "$d" + if [ ${errorcount} -gt 50 ]; then + printf "Too many errors encountered previously, this diff is hidden.\n" + else + printf "%s\n" "$d" + fi # Disable build failure at this moment as we need to have a complete MT source whitelist to check fail=0 fi |