Skip to content


clang-format: limit diff to 50 files to prevent exceding the maximum …
Browse files Browse the repository at this point in the history
…travis output (4MB) (#5455)
  • Loading branch information
nerzhul committed Mar 26, 2017
1 parent 1139a18 commit aa5549e
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions util/travis/
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,18 @@ function perform_lint() {
files_to_lint="$(find src/ -name '*.cpp' -or -name '*.h' | egrep -v '^src/(gmp|lua|jsoncpp)/')"

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
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"
printf "%s\n" "$d"
# Disable build failure at this moment as we need to have a complete MT source whitelist to check
Expand Down

0 comments on commit aa5549e

Please sign in to comment.