if (!lua_isnil(L, -1)) {
v3f pos = read_v3f(L, -1) * BS;
lua_pop(L, 1);
- handle =
- sound->playSoundAt(spec.name, looped, gain * spec.gain, pos);
+ handle = sound->playSoundAt(
+ spec.name, looped, gain * spec.gain, pos);
lua_pushinteger(L, handle);
return 1;
}
else
CLANG_FORMAT=clang-format
fi
+ echo "LINT: Using binary $CLANG_FORMAT"
CLANG_FORMAT_WHITELIST="util/travis/clang-format-whitelist.txt"
if [ "$TRAVIS_EVENT_TYPE" = "pull_request" ]; then
d=$(diff -u "$f" <(${CLANG_FORMAT} "$f") || true)
if ! [ -z "$d" ]; then
- whitelisted=$(egrep -c "^${f}" "${CLANG_FORMAT_WHITELIST}")
+ whitelisted=$(awk '$1 == "'$f'" { print 1 }' "$CLANG_FORMAT_WHITELIST")
# If file is not whitelisted, mark a failure
- if [ ${whitelisted} -eq 0 ]; then
+ if [ -z ${whitelisted} ]; then
errorcount=$((errorcount+1))
printf "The file %s is not compliant with the coding style" "$f"