Skip to content

Commit

Permalink
LINT fix & check all files with clang-format
Browse files Browse the repository at this point in the history
Seems the diff mode doesn't work well, PR are detected as working whereas in master it's shown it's problematic (and really problematic). Use same check everywhere
  • Loading branch information
nerzhul committed May 22, 2017
1 parent 39f4a2f commit 0530922
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 8 deletions.
2 changes: 1 addition & 1 deletion src/script/lua_api/l_client.cpp
Expand Up @@ -88,7 +88,7 @@ int ModApiClient::l_display_chat_message(lua_State *L)
// send_chat_message(message)
int ModApiClient::l_send_chat_message(lua_State *L)
{
if (!lua_isstring(L,1))
if (!lua_isstring(L, 1))
return 0;
std::string message = luaL_checkstring(L, 1);
getClient(L)->sendChatMessage(utf8_to_wide(message));
Expand Down
8 changes: 1 addition & 7 deletions util/travis/lint.sh
Expand Up @@ -9,13 +9,7 @@ function perform_lint() {
echo "LINT: Using binary $CLANG_FORMAT"
CLANG_FORMAT_WHITELIST="util/travis/clang-format-whitelist.txt"

if [ "$TRAVIS_EVENT_TYPE" = "pull_request" ]; then
# Get list of every file modified in this pull request
files_to_lint="$(git diff --name-only --diff-filter=ACMRTUXB $TRAVIS_COMMIT_RANGE | grep '^src/[^.]*[.]\(cpp\|h\)$' | true)"
else
# Check everything for branch pushes
files_to_lint="$(find src/ -name '*.cpp' -or -name '*.h')"
fi
files_to_lint="$(find src/ -name '*.cpp' -or -name '*.h')"

local errorcount=0
local fail=0
Expand Down

0 comments on commit 0530922

Please sign in to comment.